Placement Papers - Grapecity

Grapecity Inc
GRAPECITY PAPER
Posted by :
Pragna
(28)
7. <class Item>
void foo(Item x);
which is right way to call with integer argument I?
a. foo(i);      b. foo<int > (i);      c. foo<Item>(i);    d. foo(<int> i);
e. foo(<Item > i);

8.
9. void quiz(int w)
{
if(w>1)
{ quiz (w/2);
quiz(w/2);
}
printf("*");
}
how many asterisks are printed by the function call quiz(5)?
a. 3       b. 4      c. 7       d. 8

10. void test_a (int n)
{
printf("%d",n);
if(n>0)
test_a(n-2);
}
test_a(4)?
a . 0 2 4     c. 0 2      d. 2 4       e. 4 2     f. 4 2 0

11. char string[8]="abcdefg";
*string=\'