PROMOTE MY BLOG: JUST CLICK BELOW BUTTON

Search Any Paper On This Blog

Monday, February 21, 2011

CS304- Object Oriented Programming cOMPLETE sOLVED FINAL tERM 2009 paper

FINALTERM  EXAMINATION
Fall 2009
CS304- Object Oriented Programming (Session - 1)
Time: 120 min
Marks: 75
Question No: 1    ( Marks: 1 )    - Please choose one
 Which one of the following terms must relate to polymorphism?

       ► Static allocation

       ► Static typing
       ► Dynamic binding
       ► Dynamic allocation
   
Question No: 2    ( Marks: 1 )    - Please choose one
 Multiple inheritance can be of type





       ► Public
       ► Private
       ► Protected
       ► All of the given

   
Question No: 3    ( Marks: 1 )    - Please choose one
 When a subclass specifies an alternative definition for an attribute or method of its superclass, it is _______ the definition in the superclass.






       ► overload
       ► overriding
       ► copy riding
       ► none of given
   
Question No: 4    ( Marks: 1 )    - Please choose one
 Like template functions, a class template may not handle all the types successfully.



       ► True
       ► False
   
Question No: 5    ( Marks: 1 )    - Please choose one
 It is sometimes useful to specify a class from which no objects will ever be created.





       ► True
       ► False
   
Question No: 6    ( Marks: 1 )    - Please choose one
 Assume a class Derv that is privately derived from class Base. An object of class Derv located in main() can access





       ► public members of Derv.
       ► protected members of Derv.
       ► private members of Derv.
       ► protected members of Base.
   
Question No: 7    ( Marks: 1 )    - Please choose one
 A pointer to a base class can point to objects of a derived class.
           



       ► True
       ► False
   
Question No: 8    ( Marks: 1 )    - Please choose one
 A copy constructor is invoked when






       ► a function do not returns by value.
       ► an argument is passed by value.
       ► a function returns by reference.
       ► an argument is passed by reference.
   
Question No: 9    ( Marks: 1 )    - Please choose one
 A function call is resolved at run-time in___________






       ► non-virtual member function.
       ► virtual member function.
       ► Both non-virtual member and virtual member function.
       ► None of given
   
Question No: 10    ( Marks: 1 )    - Please choose one
 When the base class and the derived class have a member function with the same name, you must be more specific which function you want to call (using ___________).






       ► scope resolution operator
       ► dot operator
       ► null operator
       ► Operator overloading
   
Question No: 11    ( Marks: 1 )    - Please choose one
 Each try block can have ______ no. of catch blocks.

       ► 1
       ► 2
       ► 3
       ► As many as necessary.

   
Question No: 12    ( Marks: 1 )    - Please choose one
 Two important STL associative containers are _______ and _______.





       ► set,map
       ► sequence,mapping
       ► setmet,multipule
       ► sit,mat
   
Question No: 13    ( Marks: 1 )    - Please choose one
 The mechanism of selecting function at run time according to the nature of calling object is called,






       ► late binding
       ► static binding
       ► virtual binding
       ► None of the given options
   
Question No: 14    ( Marks: 1 )    - Please choose one
 An abstract class is useful when,






       ► We do not derive any class from it.
       ► There are multiple paths from one derived class to another.
       ► We do not want to instantiate its object.
       ► You want to defer the declaration of the class.
   
Question No: 15    ( Marks: 1 )    - Please choose one
 Which of the following is incorrect line regarding function template?





       ► template<class T>
       ► template <typename U>
       ► Class<template T>
       ► template  < class T, class U>
   
Question No: 16    ( Marks: 1 )    - Please choose one
 Which of the following is/are advantage[s] of generic programming?









       ► Reusability
       ► Writability
       ► Maintainability
       ► All of given
   
Question No: 17    ( Marks: 1 )    - Please choose one
 By default the vector data items are initialized to ____


       ► 0
       ► 0.0
       ► 1
       ► null
   
Question No: 18    ( Marks: 1 )    - Please choose one
 Which one of the following functions returns the total number of elements in a vector.
       ► length();
       ► size();
       ► ele();
       ► veclen();
   
Question No: 19    ( Marks: 1 )    - Please choose one
 Suppose you create an uninitialized vector as follows:

vector<int> evec;
After adding the statment,
evec.push_back(21);
what will happen?
       ► The following statement will add an element to the start (the back) of evec and will initialize it with the value 21.
       ► The following statement will add an element to the center of evec and will reinitialize it with the value 21.
       ► The following statement will delete an element to the end (the back) of evec and will reinitialize it with the value 21.
       ► The following statement will add an element to the end (the back) of evec and initialize it with the value 21.

   
Question No: 20    ( Marks: 1 )    - Please choose one
 An STL container can not be used to,




       ► hold objects of class employee.
       ► store elements in a way that makes them quickly accessible.
       ► compile c++ programs.
       ► organize the way objects are stored in memory
   
Question No: 21    ( Marks: 1 )    - Please choose one
 Algorithms can only be implemented using STL containers.

       ► True
       ► False
   
Question No: 22    ( Marks: 1 )    - Please choose one
 The main function of scope resolution operator (::) is,






       ► To define an object
       ► To define a data member
       ► To link the definition of an identifier to its declaration
       ► To make a class private
   
Question No: 23    ( Marks: 1 )    - Please choose one
 When is a constructor called?





       ► Each time the constructor identifier is used in a program statement
       ► During the instantiation of a new object
       ► During the construction of a new class
       ► At the beginning of any program execution
   
Question No: 24    ( Marks: 1 )    - Please choose one
 Consider the code below,
class Fred {
public:
Fred();
...
};
int main()
{
Fred a[10];
Fred* p = new Fred[10];
...
}
Select the best option,
       ► Fred a[10]; calls the default constructor 09 times
Fred* p = new Fred[10];  calls the default constructor 10 times

       ► Produce an error

       ► Fred a[10]; calls the default constructor 11 times
Fred* p = new Fred[10];  calls the default constructor 11 times

       ► Fred a[10]; calls the default constructor 10 times
Fred* p = new Fred[10];  calls the default constructor 10 times

   
Question No: 25    ( Marks: 1 )    - Please choose one
 Associativity can be changed in operator overloading.





       ► True
       ► False
   
Question No: 26    ( Marks: 1 )    - Please choose one
 A normal C++ operator that acts in special ways on newly defined data types is said to be






       ► glorified.
       ► encapsulated.
       ► classified.
       ► overloaded.

   
Question No: 27    ( Marks: 1 )    - Please choose one
 Which operator can not be overloaded?






       ► The relation operator ( >= )
       ► Assignment operator ( = )
       ► Script operator ( [] )
       ► Conditional operator (? : )
   
Question No: 28    ( Marks: 1 )    - Please choose one
 Suppose obj1 and obj2 are two objects of a user defined class A. An + operator is overloaded to add obj1 and obj2 using the function call obj1+obj2.
Identify the correct function prototype against the given call?






       ► A operator + ( A &obj);
       ► int + operator();
       ► int operator (plus) ();
      ► A operator(A &obj3);
   
Question No: 29    ( Marks: 1 )    - Please choose one
 Default constructor is such constructor which either has no ---------or if it has some parameters these have -------- values
       ► Parameter, temporary
       ► Null, Parameter
       ► Parameter, default
       ► non of the given
   
Question No: 30    ( Marks: 1 )    - Please choose one
 Public methods of base class can --------- be accessed in its derived class
       ► directly
       ► inderectly
       ► simultaniously
       ► non of the given
   
Question No: 31    ( Marks: 1 )
 Is Deque a Birectional Container?http://www.allvupastpapers.blogspot.com/  

Yes, deque behaves like queue (line) such that we can add elements on both sides of it.

   
Question No: 32    ( Marks: 1 )
 What is meant by Generic Programming?

Generic programming refers to programs containing generic abstractions general  code that is same in logic for all data types like printArray function), then we instantiate that generic program abstraction (function, class) for a particular data type, such abstractions can work with many different types of data.
   
Question No: 33    ( Marks: 2 )
 Sort the following data in the order in which compiler searches a function?
Complete Specialization, Generic Template, Partial Specialization, Ordinary Function.

Specializations of this function template, instantiations with specific types, can be called just like an ordinary function:
cout << max(3, 7);   // outputs 7
The compiler examines the arguments used to call max and determines that this is a call to max(int, int). It then instantiates a version of the function where the parameterizing type T is int, making the equivalent of the following function:
int max(int x, int y)
{
    return x < y ? y : x;
}
the C++ Standard Template Library contains the function template max(x, y) which creates functions that return either x or y, whichever is larger. max() could be defined like this:
template <typename T>
T max(T x, T y) 
{
    return x < y ? y : x;
}

   
Question No: 34    ( Marks: 2 )
 State any conflict that may rise due to multiple inheritance?
The conflict may arise is the diamond problem, which our author likes to call the “diamond of doom”. This occurs when a class multiply inherits from two classes which each inherit from a single base class. This leads to a diamond shaped inheritance pattern.
For example, consider the following set of classes:
classPoweredDevice
{
};
classScanner: publicPoweredDevice
{
};
classPrinter: publicPoweredDevice
{
};
classCopier: publicScanner, publicPrinter
{


Scanners and printers are both powered devices, so they derived from PoweredDevice. However, a copy machine incorporates the functionality of both Scanners and Printers.
Ambiguity also cause problem.


   
Question No: 35    ( Marks: 3 )
 Describe three properties necessary for a container to implement Generic Algorithms.

If you declare a container as holding pointers, you are responsible for managing the memory for the objects pointed to. The container classes will not automatically free memory for these objects when an item is erased from the container.
Container classes are expected to implement methods to do the following:
·        create a new empty container (constructor),
·        report the number of objects it stores (size),
·        delete all the objects in the container (clear),
·        insert new objects into the container,
·        remove objects from it,
·        provide access to the stored objects.


   
Question No: 36    ( Marks: 3 )
 Write three important features of virtual functions.
With virtual functions, derived classes can provide new implementations of functions from their base classes. When someone calls a virtual function of an object of the derived class, this new implementation is called, even if the caller uses a pointer to the base class, and doesn't even know about the particular derived class.
The virtual function is an option, and the language defaults to non virtual, which is the fastest configuration.
The derived class can completely "override" the implementation or "augment" it (by explicitly calling the base class implementation in addition to the new things it does).

   
Question No: 37    ( Marks: 3 )
 Consider the code below,

#include <iostream>
#include <stdlib.h>
using namespace std;
class Shape{
        public:
        void Draw(){cout<<"shape"<<endl;}
    };
lass Line : public Shape{
        public:
        void Draw(){cout<<"Line"<<endl;}
        };
class Circle : public Shape{
        public:
        void Draw(){cout<<"Circle"<<endl;}
        };
int main(int argc, char *argv[])
{
  Shape * ptr1 = new Shape();
  Shape * ptr2 = new Line();
  Shape * ptr3 = new Circle();
 
  ptr1->Draw();
  ptr2->Draw();
  ptr3->Draw();
  system("PAUSE"); 
  return 0;
}

This code shows output,

Shape
Shape
Shape

Give the reason for this output

Suppose we want to show the output,

Shape
Line
Circle

How we can change the code to do that?

class shape { public:
   void draw();
};
class circle : public shape { };
int main(int argc, char **argv){
   circle my_circle;
   my_circle.draw();
}
While this has all the usual advantages, e.g., code reuse, the real power of polymorphism comes into play when draw is declared to be virtual or pure virtual, as follows:
class shape{ public:
   virtual void draw()=0;
};
class circle : public shape { public:
   void draw();

Here, circle has declared its own draw function, which can define behavior appropriate for a circle. Similarly, we could define other classes derived from shape, which provide their own versions of draw. Now, because all the classes implement the shape interface, we can create collections of objects that can provide different behavior invoked in a consistent manner (calling the draw member function). An example of this is shown here.
shape *shape_list[3];   // the array that will
                            // pointer to our shape objects
shape[0] = new shape;  // three types of shapes
shape[1] = new line;  // we have defined
shape[2] = new circle;
for(int i = 0; i < 3; i++){
   shape_list[i].draw();
}
When we invoke the draw function for each object on the list, we do not need to know anything about each object; C++ handles the details of invoking the correct version of draw. This is a very powerful technique, allowing us to provide extensibility in our designs. Now we can add new classes derived from shape to provide whatever behavior we desire. The key here is that we have separated the interface (the prototype for shape) from the implementation.


   
Question No: 38    ( Marks: 5 )
 There are some errors in the code given below, you have to
1.      Indicate the line no. with error/s
2.      Give the reason for error/s
3.      Correct the error/s.

1.      #include <iostream>          this will be #include <iostream.h>
2.      #include <stdlib.h>

3.      using namespace std;
4.      template <typename T>
5.      class MyClass{
6.      public:
7.      MyClass(){
8.      cout<<"This is class1"<<endl;
9.      }
10. };
11. template <typename T>   
12. class MyClass<int*>{
13. public:
14. MyClass(){
15. cout<<"This is class2"<<endl;
16. }
17. };
18. int main(int argc, char *argv[])
19. {
20. MyClass<int> c1;
21. MyClass<int*> c2;
22. system("PAUSE");   
23. return 0;
24. }

   
Question No: 39    ( Marks: 5 )
 Given are two classes A and B. class B is inherited from class A. Write a code snippet(for main function) that polymorphically call the method of class B. Also what changes do you suggest in the given code segment that are required to call the class B method polymorphically.
class A
{
public:
void method() { cout<<"A's method \n"; }

};

class B : public A
{

public:
void method() { cout<<"B's method\n"; }

};


Ans:


public class Test
{
public class A {}

public class B extends A {}

private void test(A a)
{
System.out.println("test(A)");
}

private void test(B b)
{
System.out.println("test(B)");
}

public static void main(String[] args)
{
Test t = new Test();
A a = t.new A();
A b = t.new B();

t.test(a);
t.test(b);
}
}


   
Question No: 40    ( Marks: 10 )
 Create built-in STL (Standard Template Library) vector class object for strings and add in it some words by taking input from user, then apply the sort() algorithm to array of words stored in this vector class object.
Hint:Use push_back() to add the words in vector class object, and the [] operator and size() to display these sorted words.

The STL is the containers, iterators and algorithms component of the proposed C++ Standard Library [ANSI95]. It represents a novel application of principles which have their roots in styles of programming other than Object-orientation.
void listWords(istream& in, ostream& out)
{
        string s;

        while (!in.eof() && in >> s) {
                add s to some container
        }

        sort the strings in the container
        remove the duplicates

        for (each string t in container) {
                out << t;
        }
}
For now, assume that a word is defined as a whitespace-separated string as delivered by the stream extraction operator. Later on we will consider ways of refining this definition.
Given the way this problem is expressed, we can implement this program directly, if naïvely. The STL container class vector will suffice to hold the words: applying the algorithms sort and unique provides the required result.
void listWords(istream& in, ostream& out)
{
        string s;
        vector<string> v;

        while (!in.eof() && in >> s)
                v.push_back(s);                 // (1)

        sort(v.begin(), v.end());

        vector<string>::iterator e
                = unique(v.begin(), v.end());   // (2)

        for (vector<string>::iterator b = v.begin();
                b != e;
                b++) {
                out << *b << endl;
        }
}
At (1) the vector member function push_back() is used to add to the end of the vector. This can also be done using the insert member, which takes as a parameter an iterator identifying the position in the vector at which to place the added element:
       v.insert(v.end(), s);
This allows us to add at any position in the vector. Be aware, though, that adding anywhere other than the end implies the overhead of physically shifting all elements from the insertion point to the end to make room for the new value. For this reason, and given the choices made in this example, attempts to optimise this code by maintaining the vector in sorted order are unwise. Replace vector with list and this becomes possible - although in both cases a search over the container will be necessary to determine the correct position of insertion.
The unique algorithm has the surprising property of not changing the length of the container to which it is applied (it can hardly do this, as it has access not to the underlying container, but only to the pair of iterators it is passed). Instead, it guarantees that duplicates are removed by moving unique entries towards the beginning of the container, returning an iterator indicating the new end of the container. This can be used directly (as here, at (2)), conversely it can be passed to the erase member with the old end iterator, to truncate the container.


   
Question No: 41    ( Marks: 10 )
 Q. Write a detailed note on Exceptions in Destructors with the help of  a coding example.

Exceptions in Destructors:
An object is presumably created to do something. Some of the changes made by an object should persist after an object dies (is destructed) and some changes should not. Take an object implementing a SQL query. If a database field is updated via the SQL object then that change should persist after the SQL objects dies. To do its work the SQL object probably created a database connection and allocated a bunch of memory. When the SQL object dies we want to close the database connection and deallocate the memory, otherwise if a lot of SQL objects are created we will run out of database connections and/or memory.
The logic might look like:
Sql::~Sql()
{
   delete connection;
   delete buffer;
}
Let's say an exception is thrown while deleting the database connection. Will the buffer be deleted? No. Exceptions are basically non-local gotos with stack cleanup. The code for deleting the buffer will never be executed creating a gaping resource leak.
Special care must be taken to catch exceptions which may occur during object destruction. Special care must also be taken to fully destruct an object when it throws an exception.

Example code for exception ……

#include<iostream.h>
#include<conio.c>

class Exception {
private:

 char message[30]  ;

public:

 Exception() {strcpy(message,"There is not enough stock");}

 char * get_message() { return message; }
};

class Item {
private:
 
 int stock ;

 int required_quantity;
public:
 
 Item(int stk, int qty)
    {
     stock =  stk;
     required_quantity =  qty;
 }

    int get_stock()
    {
        return stock;
    }
  
    int get_required_quantity()
    {
        return required_quantity;
    }

    void order()
    {
         if (get_stock()< get_required_quantity())
     
         throw Exception();
                      else
                      cout<<"The required quantity of item is available in the stock";
 
http://www.allvupastpapers.blogspot.com/  
   }
  
     ~Item(){}
};


void main()
{
   
    Item obj(10, 20);
 
 try
    {
  obj.order();
 }

 catch(Exception & exp2)
    {
     getch();
  cout << "Exception: " << exp2.get_message() << endl;
 }

 getch();

Sunday, February 20, 2011

CS601-Data Communication Subjective Questions Solved For FinalTerm Papers

Question No: 41 ( Marks: 2 )
What are the conditions for the polynomial used by the CRC generator?
CRC generator:
CRC generator (the divisor) is most often represented not as a1’s and 0’s but as an algebraic polynomial.
conditions for the polynomial:
it should have following properties:
It should not be divisible by “x”.
It should not be divisible by “x+1”.
The first condition guarantees that all burst error of a length equal to degree of the polynomial is detected.
The 2nd condition guarantees that all burst error affecting an odd number of bits are detected.

Question No: 42 ( Marks: 2 )
What are intelligent modems?
Intelligent modems:
A modem that responds to commands and can accept new instructions during online transmission. It was originally developed by Hayes.
Example:
• Automatic answering,
• Dialing etc.
Question No: 43 ( Marks: 2 )
What is the basic purpose of Router?
Basic purpose of Router:
"A router is a device that extracts the destination of a packet it receives, selects the best path to that destination, and forwards data packets to the next device along this path. They connect networks together;
a LAN to a WAN for example, to access the Internet. 
"A more precise definition of a router is a computer networking device that interconnects separate logical subnets."
Question No: 44 ( Marks: 3 )
What are the fractional T Lines?
http://www.allvupastpapers.blogspot.com/
The fractional T Lines:
Many subscribers don’t need the entire capacity of the T-line. 
For example,
A small business may need only one-fourth of the capacity of T-line. if four business of same size lie in the same building, they can share T-line.DSU/CSU allow the capacity of T-line to be interleaved in to four channels

Question No: 45 ( Marks: 3 )
What are the light sources used for optic fiber?
• light sources used for optic fiber:
• The light source can weather be an LED or ILD 
• LED (Light emitting diode) cheaper but provide unfocused light that strikes the boundaries of channel at uncontrollable angles.
• Limited to short distance use.
• LASSER 
• Can be focused to a narrow range allowing control over angle of incidence.

Question No: 46 ( Marks: 3 )
What is Multi Access Unit (MAU) in Token Ring?
Multi Access Unit (MAU) in Token Ring:
• Individual automatic switches are combined in to a hub
• One MAU can support up to 8 stations.
• Although it looks like a star, it is in fact a ring.


Question No: 47 ( Marks: 5 )
Give characteristics of Dual Ring, if necessary then draw the diagram. [5]
Characteristics of Dual Ring:
A network topology in which two concentric rings connect each node on a network instead of one network ring that is used in a ring topology. Typically, the secondary ring in a dual-ring topology is redundant. It is used as a backup in case the primary ring fails. In these configurations, data moves in opposite directions around the rings. Each ring is independent of the other until the primary ring fails and the two rings are connected to continue the flow of data traffic.


Question No: 48 ( Marks: 5 )
What the receiver will receive if the checksum method is applied to the following 
bit.
10101001 00111001
Ans:
the receiver will receive the checksum method is applied to the following bit.
10101001 00111001
10101001 00111001
Sum of 2 bits are
10101001
00111001
-------------------
11100010
00011101 1's complement
1
--------------
00011110 2's complement
-----------
10101001 00111001 ==> 00011110

www.allvupastpapers.blogspot.com
So the data transmitted which will receiver get:
10101001 00111001 00011110
Question No: 49 ( Marks: 5 )
What is rafraction in terms of optic fiber? Give one example.
Refraction:
Light travels in a straight line as long as it is moving through a single uniform structure If a ray of light traveling through one substance enters another (more or less dense) substance, its speed changes abruptly causing the ray to change direction. This phenomenon is called Refraction.
Refraction in terms of optic fiber:
the propagation of light in an optical fiber which in its simplest form consists of a circular core of uniform refractive index surrounded by a cladding of slightly lower refractive index. The light is launched into the entrance face of the fiber. 
The light is propagated by the total internal reflection at the interface between core and cladding. However the rays incident at angles larger than a certain angle, called the cut-off angle, suffer both refraction and reflection at the interface between the core and the cladding. 
They, therefore, are not guided. Due to this the optical fiber has a numerical aperture. The numerical aperture is given by the square root of (n12-n22). Typical values of numerical aperture lie between 0.1 and 0.3.
The refractive indices of the core and the cladding are n1 and n 2 respectively. The fiber is normally in air (n0=1) but could also be in a medium of refractive index n0.

www.allvupastpapers.blogspot.com
Question No: 50 ( Marks: 10 )
What are the asynchronous protocols in data link layer? Discuss in detail with examples. [10 marks]
Asynchronous protocols in data link layer:
Asynchronous communication at the data link layer or higher protocol layers is known as statistical multiplexing or packet mode communication,
For example :
Asynchronous transfer mode (ATM). In this case the asynchronously transferred blocks are called data packets, 
Async protocols in Data link layer is called statistical multiplexing. for example ATM cells.
The opposite is circuit switched communication, which provides constant bit rate, for example ISDN and SONET/SDH.
The packets may be encapsulated in a data frame, with a frame synchronization bit sequence indicating the start of the frame, and sometimes also a bit synchronization bit sequence, typically 01010101, for identification of the bit transition times. Note that at the physical layer, this is considered as synchronous serial communication.
Examples of packet mode data link protocols that can be/are transferred using synchronous serial communication are the 
• HDLC,
• Ethernet,
• PPP and 
• USB protocols.


Question No: 51      ( Marks: 2 )


What is the formula to calculate the number of redundancy bits required to correct a bit error in a given number of data bits? [2]

Messages(frames) consist of m data (message) bits, yielding an n=(m+r)-bit codeword.



Question No: 52      ( Marks: 2 )


What is R G rating of coaxial cable?
Different coaxial cable designs are categorized by their Radio government (
RG ) ratings
Each cable defined by RG rating is adapted for a specialized function:
RG-8
www.allvupastpapers.blogspot.com·        Used in Thick Ethernet
RG-9
·        Used in Thick Ethernet
RG-11
·        Used in Thick Ethernet
RG-58
·        Used in Thin Ethernet
RG-59
·        Used for TV



Question No: 53      ( Marks: 2 )


What are the advantages of thin ethernet?
The advantages of thin Ethernet are :
·        reduced cost and
·        ease of installation
Because the cable is lighter weight and more flexible than that used in Thicknet

Question No: 54      ( Marks: 3 )


What is the difference between a unicast, multicast, and broadcast address? [3]
Three methods can be used to transmit packets over a network: unicast, multicast, and broadcast.
Uhttp://www.allvupastpapers.blogspot.com/nicast involves communication between a single sender and a single receiver. This is a type of point-to-point transmission; since the packet is transmitted to one destination at a time.
Multicast is used to send packets to a group of addresses, represented by a "group address." In this case, packets are transmitted from a single sender to multiple receivers. Since the same data packet can be sent to multiple nodes by sending just one copy of the data, the load of the sender and the overall load of the network are both reduced.
Broadcast involves sending packets to all nodes on a network simultaneously. This type of transmission is used to establish communication with another host, and for DHCP type methods of assigning IP addresses.




Question No: 55      ( Marks: 3 )


T lines are designed for Digital data how they can be used for Analog Transmission ?
T Lines are digital lines designed for digital data however; they can also be used for analog transmission (Telephone connections). Analog signals are first sampled and the Time Multiplexed.


Question No: 56      ( Marks: 3 )


What are the three types of Guided Media?
Guided Media, are those media that provide a conduit from one device to another. Three types are
1.      Twisted pair cable
2.      Coaxial cable
3.      Fiber-optic Cable


Question No: 57      ( Marks: 5 )


Why do we need Inverse Multiplexing? [5]
Data & Video can be broken into smaller portions using Inverse Multiplexing and TX. An inverse multiplexer (often abbreviated to "inverse mux" or "imux") allows a data stream to be broken into multiple lower data rate communication links. An inverse multiplexer differs from a demultiplexer in that each of the low rate links coming from it is related to the others and they all work together to carry their respective parts of the same higher rate data stream. By contrast, the output streams from a demultiplexer may be completely independent from each other and the demultiplexer does not have to understand them in any way.
This is the opposite of a multiplexer which creates one high speed link from multiple low speed ones.
It can lease a 1.544 Mbps line from a common carrier and only use it fully for
sometime
Or it can lease several separate channels of lower data rates
Voice can be sent over any of these channels


Question No: 58      ( Marks: 5 )

Describe method of checksum briefly?
The sender subdivides data units into equal segments of ‘n’ bits(16 bits).These segments are added together using one’s complement. The total (sum) is then complemented and appended to the end of the original data unit as redundancy bits called CHECKSUM. The extended data unit is transmitted across the network. The receiver subdivides data unit as above and adds all segments together and complement the result. If the intended data unit is intact, total value found by adding the data segments and the checksum field should be zero. If the result is not zero, the packet contains an error & the receiver rejects it


Question No: 59      ( Marks: 10 )


Explain Asynchronous Time Division Multiplexing in detail? Also discuss its advantages over synchronous TDM?
Asynchronous time-division multiplexing (ATDM) is a method of sending information that resembles normal TDM, except that time slots are allocated as needed dynamically rather than preassigned to specific transmitters. ATDM is more intelligent and has better bandwidth efficiency than TDM.

Time-division multiplexing (TDM) is a type of digital or (rarely) analog multiplexing in which two or more signals or bit streams are transferred apparently simultaneously as sub-channels in one communication channel, but are physically taking turns on the channel. The time domain is divided into several recurrent timeslots of fixed length, one for each sub-channel. A sample byte or data block of sub-channel 1 is transmitted during timeslot 1, sub-channel 2 during timeslot 2, etc. One TDM frame consists of one timeslot per sub-channel. After the last sub-channel the cycle starts all over again with a new frame, starting with the second sample, byte or data block from sub-channel 1, etc.
asynchronous time-division multiplexing comprising receive circuits (CRl/i) supplying cells received via input links, transmit circuits (CTl/j) transmitting retransmitted cells on output links, a buffer memory (MT) storing the received cells and delivering the cells to be retransmitted and a buffer memory addressing device (SMT) including a write address source (SAE) and a read address source (fsl/j).
The switching unit further comprises a write disabling circuit (pi) conditioned by a signal (adl) derived from the content of at least one received cell or a signal (tle) derived from the absence of any received cell and supplying a disabling signal (spi) and the address source includes a disabling device (pac, pal) influenced by the disabling signal (spi) so that no memory location is then occupied in the buffer memory (MT).

Advantages asynchronous TDM:

In asynchronous TDM, the timeslots are not fixed. They are assigned dynamically as needed.
In order to reduce the communications costs in time-sharing systems and multicomputer communication systems, multiplexing techniques have been introduced to increase channel utilization. A commonly used technique is Synchronous Time Division Multiplexing (STDM). In Synchronous Time Division Multiplexing, for example, consider the transmission of messages from terminals to computer, each terminal is assigned a fixed time duration. After one user's time duration has elapsed, the channel is switched to another user. With synchronous operation, buffering is limited to one character per user line, and addressing is usually not required. The STDM technique, however, has certain disadvantages. As shown in Figure 1, it is inefficient in capacity and cost to permanently assign a segment of bandwidth that is utilized only for a portion of the time. A more flexible system that efficiently uses the transmission facility on an "instantaneous time-shared" basis could be used instead. The objective would be to switch from one user to another user whenever the one user is idle, and to asynchronously time multiplex the data. With such an arrangement, each user would be granted access to the channel only when he has a message to transmit. This is known as an Asynchronous Time Division Multiplexing System (ATDM). A segment of a typical ATDM data stream is shown in Figure 2. The crucial attributes of such a multiplexing technique are:
1. An address is required for each transmitted message, and
2. Buffering is required to handle the random message arrivals.
Question No: 31      ( Marks: 2 )


What are the advantages of a multipoint connection over a point-to-point connection?
Answer:
Point-to-point connection is limited to two devices, where else more than two devices share a single link in multipoint connection. Multipoint connection can be used for fail-over and reliability.


Question No: 32      ( Marks: 2 )


What's the name of the telephone service in which there is no need of dialing.

Answer:

DSS (digital data service)   is the telephone service in which there is no need of dialing.
 



Question No: 33      ( Marks: 2 )


Which type of frames are present in BSC frames?
Answer:
There are two types of frames that are present in BSC.
1.      Control Frames and
2.      Data Frames




Question No: 34      ( Marks: 2 )


What methods of line discipline are used for peer to peer and  primary secondary communication?
Answer:
Line discipline is done in two ways:
1.      ENQ/ACK      (Enquiry Acknowledgement)

         This is used for peer to peer communication.
2.      Poll/ Select
This method is used for primary secondary communication.

Question No: 35      ( Marks: 3 )


How does the checksum checker know that the received data unit is undamaged? [3]

Answer:

Checksum Checker or generator:
The sender subdivides data units into equal segments of ‘n’ bits(16 bits)
1.      These segments are added together using one’s complement.
2.      The total (sum) is then complemented and appended to the end of the original data unit as redundancy bits called CHECKSUM.
3.      The extended data unit is transmitted across the network.
4.      The receiver subdivides data unit and adds all segments together and complement the result.
5.      If the intended data unit is intact, total value found by adding the data segments and the checksum field should be zero.
6.      If the result is not zero, the packet contains an error & the receiver rejects it.






Question No: 36      ( Marks: 3 )


Which one has more overhead, a repeater or a bridge? Explain your answer. [3]

Answer:
A bridge has more overhead than a repeater. A bridge processes the packet at two
layers ; a repeater processes a frame at only one layer. A bridge needs to search a
table and find the forwarding port as well as to regenerate the signal; a repeater
only regenerates the signal. In other words, a bridge is also a repeater (and more); a
repeater is not a bridge.


Question No: 37      ( Marks: 3 )


Write down disadvantages of Ring Topology.
Answer:
Disadvantages of Ring Topology

       Unidirectional Traffic
       A break in a ring that is a disabled station can disable the entire network

      Can be solved by using:
       Dual Ring or
       A switch capable of closing off the Break



Question No: 38      ( Marks: 3 )


How parity bits are counted in VRC error detection method technique in case of odd parity generator?
Answer:
For example:
We want to TX the binary data unit 1100001
Adding together the number of 1’s gives us 3, an odd number
Before TX, we pass the data unit through a parity generator, which counts the 1’s and appends the parity bit (1) to the end
The total number of 1’s is now 4, an even number
The system now transfers the entire expanded across the network link

When it reaches its destination, the RX puts all 8 bits through an even parity checking function
If the RX sees 11100001, it counts four ones, an even number and the data unit passes
 When the parity checker counts the 1’s, it gets 5 an odd number
The receiver knows that an error has occurred somewhere and therefore rejects the whole unit
Some systems may also use ODD parity checking
The principal is the same as even parity







Question No: 39      ( Marks: 5 )


How are lost acknowledgment and a lost frame handled at the sender site? [5]

Answer:
At some error rates (16%-20%) the protocol hung up in an infinite loop, while it worked fine for other error rates. On examining the code it was determined that this problem resulted from improper variable initialization. On these certain error rates the pseudo-random number generator caused the very first frame sent to be lost or damaged. The receiver used a variable to keep track of the last in sequence frame received. This was erroneously initialized to 0. Therefore if the first frame got lost (sequence no 0), when the receiver received the second frame (sequence number 1) it sent an acknowledgment for the last in sequence frame  received, which had been initialized to 0. Therefore the sender received an acknowledgement for sequence number 0 and moved its window up accordingly. It caused everything to get out of synch, and caused the protocol to go into infinite loop.  This was resolved by initializing the variable to remember the last in sequence frame received to an out of range sequence number.




Question No: 40      ( Marks: 5 )


Explain Protocol Data Unit (PDU)?

Answer:
Protocol data unit (PDU) is an OSI term that refers generically to a group of information added or removed by a particular layer of the OSI model. In specific terms, an LxPDU implies the data and headers defined by layer x. Each layer uses the PDU to communicate and exchange information. The PDU information is only read by the peer layer on the receiving device and then stripped off, and data is handed over to the next upper layer.

Question No: 39      ( Marks: 5 )


Compare line decipline methods ENQ/ACK and Poll/ Select?
=>ENQ/ACK coordinates which device may start a transmission and whether or not the intended recipient is ready and enabled.

=> Using ENQ/ACK, a session can be initiated by either station on a link as long as both are of equal rank.

=> In both half-duplex and full-duplex transmission, the initiating device establishes the session.

=> In half duplex, the initiator then sends its data while the responder waits. The responder may take over the link when the initiator is finished or has requested a response.

=> In full duplex, both devices can transmit simultaneously once the session has been established. 

POLL/SELECT:

=> The poll/select method of line discipline works with topologies where one device is designated as a primary station and the other devices are secondary stations.

www.allvupastpapers.blogspot.com=> Multipoint systems must coordinate several nodes, not just two.

=> The question to be determined in these cases, therefore, is more than just, are you ready? It is also, which of the several nodes has the right to use the channel?