|
1. In signed magnitude notation what is the minimum value that can be represented with 8 bits a) -128 b) -255 c) -127 d) 0 Answer : c) - 127 2. Which of the following declaration is true i ) int *F() ii) int (*F)() a) Both are identical b) The first is a correct declaration and the second is wrong c) The first declaraion is a function returning a pointer to an integer and the second is a pointer to function returning int d) Both are different ways of declarin pointer to a function
Answer : c 3. The type of the controlling statement of a switch statement cannot be of the type a) int b) char c) short d)float e) none Answer : d 4. What is the output of the following program main() { int a=10; int b=6; if(a=3) b++; printf("%d %d\n",a,b++); } a) 10,6 b)10,7 c) 3,6 d) 3,7 e) none Answer : d 5. What does the hex number E78 correspond to in radix 7 ? a) 12455 b) 14153 c) 14256 d) 13541 e) 13112 Answer : d 6. Piggy backing is a technique for a) Flow control b) sequence c) Acknowledgement d) retransmition 7. Find the output of the following. main() { int i; char *p; i=0X89; p=(char *)i; p++; printf("%x\n",p); } Answer : 0X8A 8. What is the value assigned to the variable X if b is 7 ? X = b>8 ? b <<3>4 ? b>>1:b; a) 7 b) 28 c) 3 d) 14 e) None Answer : c 9. What is the output of the following program? main() { int l=6; switch(l) { default : l+=2; case 4: l=4; case 5: l++; break; } printf("%d",l); } a) 8 b) 6 c) 5 d) 4 e) none Answer : c 10. What is the value of the statement (3^6) + (a^a)? a) 3 b) 5 c) 6 d) a+18 e) None Answer : b
|