Search This Blog

Friday 6 January 2012

Kasura Tech Placement Paper

2011 Kasura Tech Placement Paper:-

1. What is the result of adding the binary numbers 01000011 and 10010000 on an 8 bit machine?

A. 11010011 B. 11110011 C. 11001011 D. 11010101

Ans: A

2.How is the decimal value for 30 represented in binary?

A. 00001111 B. 00011010 C. 00011110 D. 00011111

Ans: C

3.If an item costs Rs.3 in 99 and Rs.203 in 00.What is the % increase in price?

(a) 200/3 %
(b) 200/6 %
(c) 100%
(d) none of these

(Ans . A)

4. 5 men or 8 women do equal amount of work in a day. a job requires 3 men and 5 women to finish the job in 10 days how many woman are required to finish the job in 14 days.

a) 10
b) 7
c) 6
d) 12

(Ans 7)

5. A simple interest amount of rs 5000 for six month is rs 200. what is the anual rate of interest?

a) 10%
b) 6%
c) 8%
d) 9%

(Ans 8%)

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. none of these

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. Two liquids A : B in ratio 7:5 and now 24 gallons drain out and b is added the ratio becomes 5:7 what is containr capacity ? 30, 48 , 84, none

12. man has rope of length 660 mtr to fence a area , what is the max area he can fence ?

13. Son is about to celebrate 10th birthday. after 11 years his age will be half the average of his parents. his mother is 17 years older to him. what is the age of the father.

14. DI question where hotels project are given and no of rooms in each hotels , investment , project yr . and company nam were asked to find min cost per room is for which hotel , which avg cost per room etc.

15. Avg of 6 no is 8 what 7 th no shud be added to make avg 10;

16. Difference of cube of a no and its square is a perfect square , what is the no. -> 5

17.
union u
{
union u
{
int i;
int j;
}a[10];
int b[10];
}u;

main()
{
printf("\n%d", sizeof(u));
printf(" %d", sizeof(u.a));
// printf("%d", sizeof(u.a[4].i));
}

a. 4, 4, 4
b. 40, 4, 4
c. 1, 100, 1
d. 40 400 4


Ans: 20, 200, error for 3rd printf

18.
main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;

(*functable[0])("%d", i);
(*functable[1])("%d", i);
(*functable[1])("%d", i);
(*functable[0])("%d", &i);

}

a. 100, Runtime error.
b. 100, Random number, Random number, Random number.
c. Compile error
d. 100, Random number

19.
main()
{
int i, j, *p;
i = 25;
j = 100;
p = &i; // Address of i is assigned to pointer p
printf("%f", i/(*p) ); // i is divided by pointer p
}

a. Runtime error.
b. 1.00000
c. Compile error
d. 0.00000


Ans: c) Error becoz i/(*p) is 25/25 i.e 1 which is int & printed as a float,
So abnormal program termination,
runs if (float) i/(*p) -----> Type Casting


20.
main()
{
char c;
int i = 456;
clrscr();
c = i;
printf("%d", c);
}

a. 456
b. -456
c. random number
d. none of the above

Ans: d) -56

21.
void main ()
{
int x = 10;
printf ("x = %d, y = %d", x,--x++);
}

a. 10, 10
b. 10, 9
c. 10, 11
d. none of the above


Ans: d) Lvalue required

22..
main()
{
int i =10, j = 20;
clrscr();
printf("%d, %d, ", j-- , --i);
printf("%d, %d ", j++ , ++i);
}

a. 20, 10, 20, 10
b. 20, 9, 20, 10
c. 20, 9, 19, 10
d. 19, 9, 20, 10

Ans: c)

23. what is ment by int (* xyz)[13]

24. 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. none of these

25. class b
{
}
class a
{
friend class b
}
then what is ture
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

26. 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

No comments:

Post a Comment