CDAC Placement Paper :-
1. a man is standing on the bridge 180 mtr long. Man observes that train passes him 8 sec. while it crosses bridge in 20 sec. find the length of the train.
Ans=120 mtr.
2. there was a egg seller who tell a person that 3 of his customers told him to buy half of eggs he have along with half an egg more. Find the total no of eggs with him initially.
Ans 7 eggs
3.what was day on 12 jan 1979 ?
ans-friday
4.if 1 egg will boil in 5 min then how much time it will take to boil 4 eggs?
5.20 2.5 3.5/4 4.15
ans-5 min
6.
main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}
a. Runtime error.
b. Runtime error. Access violation.
c. Compile error. Illegal syntax
d. None of the above
Ans: d,printf( ) prints address/garbage of i,
scanf() dont hav & sign, so scans address for i
+1, -1 dont hav any effect on code
7.
main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above
Ans: b) illegal syntax for using return
8.
main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above
Ans: d) 0
9. What is the output in the following program
main()
{char c=-64;
int i=-32
unsigned int u =-16;
if(c>i)
{printf("pass1,");
if(c
printf("pass2");
else
printf("Fail2");
}
else
printf("Fail1);
if(i
printf("pass2");
else
printf("Fail2")
}
a) Pass1,Pass2
b) Pass1,Fail2
c) Fail1,Pass2
d) Fail1,Fail2
e) None of these
Ans. (c)
10. A starts business with Rs.3500 and after 5 months, B joins with A as his partner. After a year, the profit is divided in the ratio 2 : 3. What is B's contribution in the Capital ?
A) Rs. 7500 B) Rs. 8000 C) Rs. 8500 D) Rs. 9000
Ans : D
No comments:
Post a Comment