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.

Sunday, 12 April 2015

UGC NET Computer Science Solved Paper II December 2007 - Part 1

1.       A box contains six red balls and four green balls. Four balls are selected at random from the box. What is the probability that two of the selected balls are red and two are green?
(A) 3/7                (B) 4/7
(C) 5/7                (D) 6/7
Answer: A

2.       The number of edges in a complete graph with ‘n’ vertices is equal to:
(A) n(n-1)           (B) n(n-1)/2
(C) n2                 (D) 2n-1
Answer: B
3.       A context free grammar is:
(A) type 0           (B) type 1
(C) type 2          (D) type 3
Answer: C
4.       Let e: B˄m→B˄n is a group code. The minimum distance of ‘e’ is equal to:
(A) the maximum weight of a non zero code word
(B) the minimum weight of a non zero code word
(C) m
(D) n
Answer: B
5.       Consider a Moore Machine M whose digraph is:
Then L(M), the language accepted by the machine M, is the set of all strings having:
(A) two or more b’s     
(B) three or more b’s
(C) two or more a’s     
(D) three or more a’s
Answer: A
6.       A WFF that is equivalent to the WFF x=>y is:
(A) y=>x             (B) ~y=>x
(C) ~y=>~x        (D) y=>~x
Answer: B
7.       Simplified form of Boolean expression xy+(~x)z+yz is:
(A) xy+(~x)z      (B) (~x)y+(~x)z
(C) (~x)y+xz      (D) xy+xz
Answer: A
8.       In order to build a MOD-18 counter, the minimum number of flip flops needed is equal to:
(A) 18     (B) 9
(C) 5       (D) 4
Answer: C
With 'n' no. of flip-flops you can get upto max. modulo-[2^n] counter.

Therefore for modulo-18 counter 2^5 = 32 which is greater than 18 and 2^4 = 16 which is less than 18. Hence we require 5 flip-flops.
9.       The dual of the switching function F=x+yz is given by:
(A) x+yz                        
(B) x(y+z)
(C) (~x)+(~y)(~z)          
(D) (~x)((~y)+(~z))
Answer: B
10.    Amongst the logic families DTL, TTL, ECL and CMOS, the family with the least power dissipation is:
(A) CMOS         (B) DTL
(C) TTL              (D) ECL
Answer: A
11.    What cannot replace ‘?’ in the following C code to print all odd numbers less than 100?
(A) i≤100           (B) i≤101
(C) i<100           (D) i<101
Answer: B

12.    Consider the following linked list:
Which of the following piece of code will insert the node pointed to by q at the end of the list ?
(A) for (p=list; p!=NULL; p=p→next);
(B) for (p=list; p!=NULL; p=p→next);
(C) for (p=list; p→next !=NULL; p=p→next);
(D) for (p=list; p→next !=NULL; p=p→next);
Answer: D
13.    Which of the following is a valid C code to print character ‘A’ to ‘C’ ?
(A) x=’A’;
{case ‘A’=printf (“%d\n”, x);   
case ‘C’=printf (“%d\n”, x);   
(B) x=’A’;
{case ‘A’<=x <=’C’ : printf (“%d\n”, x);}
(C) x=’A’;
case ‘A’ : printf (“%d\n”, x);       
case ‘B’ : printf (“%d\n”, x);       
case ‘C’ : printf (“%d\n”, x);       
(D) x=’A’;
case ‘A’=printf (“%d\n”, x);
case ‘B’=printf (“%d\n”, x);
case ‘C’=printf (“%d\n”, x);   
Answer: correct answer not given
14.    Which of the following is not true in C++ ?
(A) “Private” elements of a base class are not accessible by members of its derived             class.
(B) “Protected” elements of base class are not accessible by members of its derived            class.
(C) When  base  class  access  specified  is  “Public”,  public  elements  of  the  base          class become public members of its derived class.
(D) When base class access specified is “Public”, protected elements of a base class become protected members of its derived class.
Answer: B
15.    Which of the following is true of constructor function in C++ ?
(A) A class must have at least one constructor.
(B) A constructor is a unique function which cannot be overloaded.
(C) A constructor function must be invoked with the object name.
(D) A constructor function is automatically invoked when an object is created.
Answer: D
16.    A primary key for an entity is:
(A) a candidate key                 (B) any  attribute
(C) a unique attribute             (D) a super key
Answer: C
17.    Aggregate functions in SQL are:
Answer: B
18.    If a relation is in 2NF and 3NF forms then:
(A) no non-prime attribute is functionally dependent on other non-prime attributes
(B) no non-prime attribute is functionally dependent on prime attributes
(C) all attributes are functionally independent
(D) prime attribute is functionally independent of all non-prime attributes
Answer: A
19.    The end of an SQL command is denoted by:
(A) an  end-of-line  character
(B) an ‘enter-key’ marker
(C) entering F4 key
(D) a semicolon (;)
Answer: D
20.    Consider  the  query  :  SELECT  student_name  FROM  students  WHERE class_name=(SELECT  class_name  FROM  students  WHERE  math_marks=100); what will be the output ?
(A) the list of names of students with 100 marks in mathematics
(B) the  names  of  all  students  of  all  classes  in  which  at  least  one  student  has 100 marks in mathematics
(C) the names of all students in all classes having 100 marks in mathematics
(D) the names and class of all students whose marks in mathematics is 100
Answer: B

  Part 1   Part 2 

1 comment:

  1. question number 6. the right answer is option c by shemalatha from madurai