CS GATE 2010 - Online Test

Q1. The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences can not be the degree sequence of any graph? I. 7, 6, 5, 4, 4, 3, 2, 1 II. 6, 6, 6, 6, 3, 3, 2, 2 III. 7, 6, 6, 4, 4, 3, 2, 2 IV. 8, 7, 7, 6, 4, 2, 1, 1
Answer : Option C
Explaination / Solution:
No Explaination.


Q2. 5 skilled workers can build a wall in 20days: 8 semi-skilled workers can build a wall in 25 days; 10 unskilled workers can build a wall in 30days. If a team has 2 skilled, 6 semi-skilled and 5 unskilled workers, how long will it take to build the wall? 
Answer : Option C
Explaination / Solution:
No Explaination.


Q3. The following C function takes a simply-linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified list. Some part of the code is left blank.
typedef struct node {
int value; 
struct node *next;
} Node;
Node *move_to_front(Node *head) {
Node *p, *q;
if ((head = = NULL: || (head->next = = NULL)) return head;
q = NULL; p = head; 
while (p-> next !=NULL) {
q=P;
p=p->next;
}
_______________________________
return head;
}
Choose the correct alternative to replace the blank line. 
Answer : Option A
Explaination / Solution:
No Explaination.


Q4. Given digits 2,2,3,3,4,4,4,4 how many distinct 4 digit numbers greater than 3000 can be formed?
Answer : Option C
Explaination / Solution:
No Explaination.


Q5. The following program is to be tested for statement coverage: 
begin
if (a = = b) {S1; exit;} 
else if (c = = d) {S2;} 
else {S3; exit;}
S4; 
end
The test cases T1, T2, T3 and T4 given below are expressed in terms of the properties satisfied by the values of variables a, b, c and d. The exact values are not given. 
T1 : a, b, c and d are all equal
T2 : a, b, c and d are all distinct
T3 : a=b and c !=d
T4 : a !=b and c=d
Which of the test suites given below ensures coverage of statements S1, S2, S3 and S4? 
Answer : Option D
Explaination / Solution:
No Explaination.


Q6.
Newton-Raphson method is used to compute a root of the equation x2 - 13 = 0 with 3.5 as the initial value. The approximation after one iteration is
Answer : Option C
Explaination / Solution:
No Explaination.


Q7. What is the possible number of reflexive relations on a set of 5 elements?

Answer : Option C
Explaination / Solution:
No Explaination.


Q8. Consider the set S = {1, ω, ω2}, where ω and ω2 are cube roots of unity. If * denotes the multiplication operation, the structure (S, *) forms 
Answer : Option C
Explaination / Solution:
No Explaination.


Q9. What is the value of 
Answer : Option D
Explaination / Solution:
No Explaination.


Q10. Consider a company that assembles computers. The probability of a faulty assembly of any computer is p. The company therefore subjects each computer to a testing process. This testing process gives the correct result for any computer with a probability of q. What is the probability of a computer being declared faulty?
Answer : Option D
Explaination / Solution:
No Explaination.