Monday 23 September 2013

2011 Zensar Placement Paper





1. complexity of merge sort .?

2. which sorting also will use to sort {1,2,3,4,5} ?

3. which cpu register holds the address of next instruction?

4. Main(){
Char *p[]=?pradeep mani?;
Printf(?%c%c%c%c?,p[i],i[p],(*p+1),*(p+1));
}

5. select * from dual ; output..??

6. if(fp = fopen(\"dfas\",\"r\") == NULL), what is the value of fp

a. NULL
b. 0
c. 1
d. 0 or 1

7. #define sqr(x) x*x, what is value of j if j = 2 * sqr(3 + 4)

8. #define FILENAME(extension) test_##extension, how will it print FILENAME(back)

a. test_back
b. test_#back
c. test_##back
d. ??

9. char *p = \"hello world\"
p[0] = \'H\', what will be printf(\"%s\", p);

a. Hello world
b. hello world
c. H
d. compile error

10. int fun(), how do u define pointer to this function ??

11. what is meant by int (* xyz)[13]

12. what is true from

a. base call reference is compatible with child class
b. child class reference is compatible with base class
c. no reference to class
d. ??

13. class b class a
{ friend class b }
then what is true

a. a can access all protected and public members in b
b. b can access all protected and public members in a
c. a can access all members of a
d. b can access all members of b

14 : what is the output

 #include
main()
{ int n=0; int i; i=2; switch(1)
{ case 0:do{ case 1:n++; case 2:n++; } while(--i>0); } printf(\"n=%d\",n); }

a. compile error
b. 4
c. 1
d. 0

15.The cost of an item is Rs 12.60. If the profit is 10% over selling price what is the selling price ?

(Ans : Rs 13.86/- )


16.There are 6 red shoes & 4 green shoes . If two of red shoes are drawn what is the probability of getting red shoes

(Ans : 6c2/10c2)


17.To 15 lts of water containing 20% alcohol, we add 5 lts of pure water. What is % alcohol.

(Ans : 15% )


18.A worker is paid Rs.20/- for a full days work. He works 1,1/3,2/3,1/8.3/4 days in a week. What is the total amount paid for that worker ?

(Ans : 57.50 )

19. A boat travels 20 kms upstream in 6 hrs and 18 kms downstream in 4 hrs.Find the speed of the boat in still water and the speed of the water current?

(a) 1/2 kmph (b) 7/12 kmph (c) 5 kmph (d) none of these

Ans. (b)

20. A goat is tied to one corner of a square plot of side 12m by a rope 7m long.Find the area it can graze?

(a) 38.5 sq.m (b) 155 sq.m (c) 144 sq.m (d) 19.25 sq.m

Ans. (a)

1 comment: