Thursday, September 8, 2011

Google Test For 7th Semester

The criteria was first 30% toppers in the class at their college(For BIT its 60% agg 
for all 6 semesters conducted). So around 40 students has 
attended the test & only 4 could clear the test.

Test consist of 15 question based on C, C++, and Data Structure and two C 
programs. 

Here are some of the questions as a student recalls.

Q1) What is the value of i after execution of the following program?


void main()
{
long l=1024;
int i=1;
while(l>=1)
{ l=l/2;
i=i+1;
}
}

a)8 b)11 c)10 d)100  ans:b 

Q2) This question is based on the complexity ... 

Q3)

s->AB
A->a
B->bbA
Which one is false for above grammer?


 

Q3) Some Trees were given & the question is to fine preorder traversal. 

Q4) One c++ program,to find output of the program?

Q5) If the mean faliure hour is 10,000 and 20 is the mean repair hour.If 
the printer is used by 100 customer, then find the availability?

1)80% 2)90% 3)98% 4)99.8% 5)100% 

Q6) One question on probability? 

Q7) In a singly linked list if there is a pointer S on the first element 
and pointer L is on the last element. Then which operation will take more 
time based on the lenght of the list?

1) Adding element at the first.
2) adding element at the end of the list.
3) To exchange the fisrt 2 element.
4) Deleting the element from the end of the list.

ans:2  check it! 



3 more question to find the output of the program and some questions are 
on Data Structures.

some conditions were given and we have to conlude either yes or no? 

The Second Section was coding.

1) Write a fucntion to multiply 2 N*N matrix

Write test cases for your code.


2) S contains the set of positive integer. Find the largest number c such 
that c=a+b where a,b,c are distict number of the set?