(Paper) Mentor Graphics Paper 9th August 2007 (Aptitude & Technical-C C++)

Paper: Mentor Graphics Paper 9th August 2007 (Aptitude & Technical-C C++)


1) what will be the out put of program..
{char *s[]={'asdasd','asdfgf','fgjhgj','tyuuuy','dsfgfds','dfdsgf'};
char **p;
for(int i=0;i<(sizeof(s)/sizeof(char *));i++)

2) what the program do...
vob (int a ,int b)
ficssa(int a[], int n)
for(int i=0;i
for(int j=i+1;j
if(a[i]>a[j]) { vob(a[i],a[j]);}

3) write a algorithm to shift a array k bits cyclically.

4) write a algorithm of a function which takes input of three parameter int number, int Index and bool value.Now we hv to replace the index'th position by bool value(0/1) in number and return the new No.

5)write a efficient an fast algorithm to find out the pair in 1,2,3,........100 no who's sum is 100.

6) single link list operations.......deleting node..etc.

Aptitude section:-

1) A bad king is there and a queen of another kingdom wants to kill him. she send a killer. King likes wine very much he has 1000 bottle of wine. the killer mix up the poisons in one of the bottle. now the bad king got knew it. so he took 10 prisoners. The poisons get effect in one month. and u have to fined out the way to decide which bottle content poisons. and u have 7 week to do so.

2) there are two bottles of 10 liter each filled with water. now two persons having bottles of 4 liter and 5 liters want to take 2-2 liters of water from the previous bottles. .now u have to pour the water without wasting or throwing it.

3) Two friends meet after 20 yrs.. first: i have three daughter multiplication of their age is 72, second i don't get. first: The oldest one start playing piano just..
second i don'nt get.. second : my oldest one is also os same age.. tell the ages of daughters..