## Sasken placement paper 2011 - 2

1. The hours remaining in a day is one-fifth of the hours passed in the day. What is the time?

2. My successor is my uncles only brothers son who is his only kid. (some what like this)

3. A and B starts from the same point and moves in opposite direction for 8 miles and 6 miles respectively. After that A turns right and moves for another 6 miles. B also turns right and moves 8 miles. What are their respective distance from the starting point?

4. In a pet shop there are 120 eyes and 172 legs. How many birds and puppies are included in these?

5. Two cyclists are moving towards each other at 10 miles/hour. They are now 50 miles apart. At this instance a fly starts from one cyclist and move towards other and moves to and fro till the two cyclist meet each other. If the fly is moving at 15 miles/hour, what is the total distance covered by the fly? 50 80 100

6. Guru’s draw has 14 blue socks and 14 black socks. How many socks must be taken to get a pair of socks of the same color?

7. Find output?
Int *ptr=&const;
Ans: error

8. Find output?
Function(i=10);
Ans: error

9. #define SWAP(x,y) t=x;x=y;y=t;
main()
{ int x=5,y=6;
if (x>y)
SWAP(x,y);
Printf(“x=%d y=%d\n”,x,y);
}
note:- That the function SWAPis not within
braces

10.
sum(int x)
{int t;
if(x<=1) return (1);
t=sum(x-3)+sum(x-1);
return (t);
}

11. if 6 is passed to the function, what is the value returned to the
calling function.
Ans:-9

12. what is int (*ptr)[]()?

13. Main()
{int a[]={0,2,4,6,8};
int *ptr;
ptr=a;
printf(“%d”, *((char *) ptr+4));
}
find output 8 2 4 6 Ans:- 4

14. which takes the same memory space regardless of the type of operating system?

Ans:- Char* char int float

15. main()
{ int I=3;
while(I--)
{int I=100;
I--;
Printf(“%d”, I);
}
}
find output?
100 99 98 99 98 97 99 99 99 error

Ans:- 99 99 99

16. main()
{char ch;
for(ch=’0’;ch<=255;ch++)
printf(“%c”, ch);
}
Ans : infinite loop

17. some program using variable b which was not initialized so
Ans:- error

18. main()

{

int i=3;

while (i--- )

{

int i=100;

i----;

printf(“%d”, i);

}

}

a) 99 99 99 b)2 2 2 c) error d) none of the above

19..Size of which data type is same irrespective of operating system.

a) char * b) char c) int d) float

20. main()

{

unsigned char c;

for (c=0; c!=256; c+)

printf(“%d”, c);

}

how many times does the loop will be executed.

a) 256 b) 255 c) infinite

21. int (*P[10])( ) Description

5. main()

{

int val = 50;

int *ptr1 = val;

int *ptr2 = ptr1;

printf(“%d %d %d,” ++val, *ptr1, *ptr2);

*ptr2 = 100;

printf(“%d %d %d,”++val, *ptr1, *ptr2);

}

a) 51 50 50 101 100 100

b) 51 51 51 101 101 101

c) error

d) none of the above

22. Equivalent Resistance between X & Y

23. Two 230v, ‘x’ watts power wire are connected in parallel & it is used to heat water when the same is connected in series at same temp what is ratio of time taken by the two.

24. Transformer turns ratio is 1:4 if primary resistance = 25ohms secondary resistance =?

25. Capacitive Reactance = 40 ohms Frequency = 500hz If the freq is reduced to 100hz what is the value of resistance.

26. If the resistance of wire of diameter ‘D’ & length ‘L’ is ‘R’ then the resistance of same wire of diameter 4D & length 16L is what?