Computer Science Study Materials for Competitive Exams

Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Friday, 31 July 2015

1.       ................ do not base their routing decisions on measurements or estimates of the current traffic and topology.
(A) Non adaptive algorithms
(B) Adaptive algorithms
(C) Static algorithms
(D) Recursive algorithms
Answer: A
2.       The method of network routing where every possible path between transmitting and receiving DTE is used is called ...............
(A) Random Routing              (B) Packet Flooding
(C) Directory Routing              (D) Message Switching
Answer: B
3.       In Hierarchical routing, the routers are divided into what is called as .................
(A) zones          (B) Cells
(C) Regions      (D) None of these
Answer: C
4.       The regions in Hierarchical routing are grouped in to .................
(A) Clusters      (B) Zones
(C) Blocks         (D) Cells
Answer: A
5.       The Clusters in Hierarchical routing are grouped in to ..................
(A) Clusters      (B) Zones
(C) Blocks         (D) Cells
Answer: B

6.       If a router sends every incoming packet out only on those lines that are going approximately in the right direction is known as .................
(A) Random flooding              (B) Static flooding
(C) Selective flooding             (D) Early flooding
Answer: C
7.       In shortest path routing algorithm, the path length is measured based on .................
(A) time delay               (B) number of hops
(C) size of the routers (D) routing table
Answer: B
8.       Flooding always choose the ....................
(A) Shortest path         (B) First path
(C) Last path                 (D) Largest path
Answer: A
9.       In military applications where large number of routers may be blown to bits at any instant, we use ...................
(A) Shortest path first  (B) First come first serve
(C) Forwarding             (D) Flooding
Answer: D
10.    In distributed applications, it is sometimes necessary to update all the databases concurrently, we use .......................
(A) Shortest path first
(B) First come first serve
(C) Forwarding
(D) Flooding
Answer: D


Thursday, 30 July 2015

1.       A ................. access specifier is needed only when inheritance is involved.
(A) public          (B) private
(C) protected     (D) automatic
Answer: C
2.       ................ is the elements of a class that are called member or data member.
(A) Pointer        (B) Variable
(C) Character   (D) Identifier
Answer: B
3.       The ............... is used to create generic function and classes.
(A) class                        (B) template
(C) specifier      (D) identifier
Answer: B
4.       The ................ defines a general set of operation that will be applied to various types of data.
(A) generic function
(B) member function
(C) function overloading
(D) operator overloading
Answer: A
5.       The function ................ displays its first argument at the tab position requested by its argument.
(A) tab                (B) out
(C) tabout          (D) tab( )
Answer: C

6.       The .................. parameter is a standard call by value parameter.
(A) tabout()        (B) tab
(C) out               (D) tab()
Answer: B
7.       The ............... function will sort any type of array.
(A) tab()             (B) tab out()
(C) sort()            (D) bubble()
Answer: D
8.       ................. is an implicit parameter to all member functions.
(A) Pointer        (B) This
(C) Enum          (D) Array
Answer: B
9.       A .............. is an object that contains memory address.
(A) constructor             (B) destructor
(C) pointer                     (D) temp
Answer: C
10.    A .............. function has access to all private and protected members of the class for which it is a friend.
(A) friend                       (B) member
(C) non-member          (D) void
Answer: A


Wednesday, 29 July 2015

1.       If an integer occupies 4 bytes and a character occupies 1 bytes of memory, each element of the following structure would occupy how many bytes ?
struct name
{
int age;
char name [20];
}
(A) 5       (B) 24
(C) 21     (D) 22
Answer: B
2.       If an array is used as function argument, the array is passed
(A) by value
(B) by reference
(C) by name
(D) the array cannot be used as a function argument
Answer: B
3.       To access a structure element using a pointer, ............... operator is used
(A) dot (.)           (B) pointer (&)
(C) pointer (*)    (D) arrow (→)
Answer: D
4.       The library function sqrt( ) operates on a double precision argument. If, i is an integer variable, which one of the following calls would correctly compute sqrt(i) ?
(A) sqrt((double)i)
(B) (double) sqrt(i)
(C) (double) (sqrt(i))
(D) sqrt(i)
Answer: A
5.       What will happen if the following loop is executed ?
int num = 0;
do
{
--num;
printf(“%d”, num);
num++;
}while (num >= 0);
}
(A) The loop will run infinite number of times
(B) The program will not enter the loop
(C) There will be a compilation error
(D) There will be runtime error
Answer: C

6.       The break statement causes an exit
(A) Only from the innermost loop
(B) Only from the innermost switch
(C) From the innermost loop or switch
(D) From the program.
Answer: C
7.       It is necessary to declare the type of function in the calling program if
(A) Function returns an integer
(B) Function returns a non-integer value
(C) Function is not defined in the same file
(D) Function is called number of times
Answer: B
8.       The function fprintf is used in a program
(A) When too many printf calls have been already used in the program
(B) In place of printf, since printf uses more memory
(C) When the output is to be printed on to a file
(D) When the type of variables to be printed are not known before
Answer: C
9.       The following statement displays
float x = 2000.53;
printf (“%e”, x);
(A) 2.00053e+04
(B) 2.00053e+03
(C) 2.00053+e04
(D) 2.0005e+03
Answer: B
10.    The output of the following is
int a = 75;
printf (“%d%%”, a);
(A) 75                 (B) 75%%
(C) 75%             (D) None of the above
Answer: D


Monday, 27 July 2015

1.       The set of optimal routes from all sources to a given destination from a tree rooted to the destination is known as .................
(A) Binary tree  (B) Sparse tree
(C) Sink tree     (D) AVL tree
Answer: C
2.       Adaptive routing algorithms get their information from .............
(A) only from local environment
(B) only from adjacent routers
(C) from locally, adjacent, external routers
(D) only from external routers
Answer: C
3.       If the route from I to J is computed in advance, off line, and downloaded to the routers when the network is booted is called as ...................
(A) Dynamic routing                (B) Session routing
(C) Temporary routing                        (D) Static routing
Answer: D
4.       In Hierarchical routing for N router subnet, the optimal number of levels is ..............
(A) logN             (B) log(N -1)
(C) lnN               (D) ln(N-1)
Answer: C
5.       The router algorithm takes the decision to changes the route when .................
(A) router changes
(B) topology changes
(C) user changes
(D) transmission time does not change
Answer: B

6.       If route from router I to router J is computed on line based on the current statistics, then it is called as ....................
(A) Dynamic routing                (B) Session routing
(C) Temporary routing                        (D) None of these
Answer: A
7.       If the subnet uses virtual circuits internally, routing decisions are made only when a new virtual circuit is being setup. This is called as.................
(A) Session routing                 (B) Circuit routing
(C) Datagram routing              (D) Forwarding
Answer: A
8.       ................. change their routing decisions to reflect changes in the topology.
(A) Nonadaptive algorithms
(B) Adaptive algorithms
(C) Static algorithms
(D) Recursive algorithms
Answer: B
9.       If router J is on the optimal path from router I to router K, then the path from J to K along the same route is ..................
(A) does not exist         (B) optimal
(C) maximum                (D) constant
Answer: B
10.    If router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route is known as ....................
(A) Routing principle              (B) Optimality principle
(C) Sink tree principle             (D) Network principle
Answer: B


Saturday, 25 July 2015

1.       If a datagram router goes down then ..............
(A) all packets will suffer
(B) only those packets which are queued in the router at that time will suffer
(C) only those packets which are not queued in the router at that time will suffer
(D) no packets will suffer
Answer: B
2.       In datagram subnet new route is chosen .....................
(A) for every packet sent
(B) for all the packet sent
(C) only for the first packet
(D) for the packet which is not transmitted
Answer: A
3.       The PSTN is an example of a ..................... network.
(A) packet switched                 (B) circuit switched
(C) message switched                        (D) None of these
Answer: B
4.       Each packet is routed independently in ...................
(A) virtual circuit subnet         (B) short circuit subnet
(C) datagram subnet               (D) ATM subnet
Answer: C
5.       For a connection oriented service, we need a ...............
(A) virtual circuit subnet         (B) short circuit subnet
(C) datagram subnet               (D) wireless subnet
Answer: C

6.       Which type of switching uses the entire capacity of a dedicated link?
(A) circuit switching
(B) datagram packet switching
(C) virtual circuit packet switching
(D) message switching
Answer: D
7.       In ............... circuit switching, delivery of data is delayed because data must be stored and retrieved from RAM.
(A) space division        (B) time division
(C) virtual                      (D) None of these
Answer: B
8.       In ................, each packet of a message need not follow the same path from sender to receiver.
(A) circuit switching
(B) message switching
(C) virtual approach to packet switching
(D) datagram approach to packet switching
Answer: D
9.       In .................., each packet of a message follows the same path from sender to receiver.
(A) circuit switching
(B) message switching
(C) virtual approach to packet switching
(D) datagram approach to packet switching
Answer: A
10.    A permanent virtual circuit involves .................
(A) Connection establishment          (B) Data transfer
(C) Connection release                      (D) Connection check
Answer: B