1. What is the value of a?:
#define SQR(x) x*x
a = SQR(2+3);
2. What will be output if you will compile and execute the following c code?
void main(){
int huge*p=(int huge*)0XC0563331;
int huge*q=(int huge*)0xC2551341;
*p=200;
printf(“%d”,*q);
}
Garbage value
null
3. Which of the following language is the predecessor to C Programming Language?
BCPL
4. C programming language was developed by
-
Dennis Ritchie
Ken Thompson
Bill Gates
5. What is the output? int c, d = 90;
c = d--;
printf("%d %d", c, d);
-
89 90,
90 89,
89 89,
6. The _______ is used to break out of the case statements.
-
continue
break
default
7. Who is father of C Language?
-
Bjarne Stroustrup
Dennis Ritchie
James A. Gosling
8. Pick the correct output:
int p = 500, g = 5;
printf("%d", p ==q);
9. C supports the ______ statement to branch unconditionally from one point to another in the program.
-
continue
goto
break
10. C Language developed at _____?
-
AT & T’s Bell Laboratories of USA in 1972
AT & T’s Bell Laboratories of USA in 1970
Sun Microsystems in 1973
11. What is the result of 16>>2?
12. Which is the correct syntax to declare constant pointer?
-
int *const constPtr;
*int constant constPtr;
const int *constPtr;
13. C Language is a successor to which language.?
-
FORTRAN
D Language
BASIC
14. int p = 35; q = 145; p = p^q; q = p^q; p= p ^q; printf("%d %d", p, q); then output will be -
-
35 145,
0 5,
145 35.
15. In which linked list last node address is null?
-
Doubly linked list
Circular list
Singly linked list
16. Low level language is .?
-
Human readable like language.
language with big program size.
language with small program size.
17. Consider the variable char c = 'p'; int i = 6, f = 2; the result of the expression c< (i+ f) is -
false
18. x – = y + 1 ; does the same as
-
x = x – y + 1
x = x – y – 1
x = – x + y + 1
19. The default parameter passing mechanism is
-
call by value
call by reference
call by value result
20. The expression 4 + 6 / 3* 2 -2 + 7 % 3 evaluates to
21. Let x be an array. Which of the following operation are illegal?
-
++ x
x + 1
x++
22. (a) If a = 11 and b = 3 what is the value of a % b? -
-
-3,
-2,
23. A set names can be represented as a
-
two-dimensional array of characters
one- dimensional array of strings
one- dimensional array of pointers to character
24. If x = y = z = -1 then what is the output of the following ++x || ++y && + printf ("z=%d", z):
25. Operand of indirection operator is
-
ordinary variable
integer constant
pointer variable
26. Which of the following statement about functions of false?
-
A function can call itself.
A function can call another function.
Constants can appear in the formal argument list.
27. "int a = -2";then memory location of a contains -
-
8000H
-2
FFFE
28. For 16-bit compiler allowable range for integer constants is ______ ?
-
-3.4e38 to 3.4e38
-32767 to 32768
-32768 to 32767
29. Write the output of the following program
fragment main ())
{
main ()
printf ("Hello world"); }
-
Compilation error,
stack overflow error,
infinite loop,
30. C is ______ Language?
-
low level
high level
assembly level
c programming mcq with answers pdf
c programming mcq pdf
100 multiple choice questions in c programming
c programming quiz questions and answers
c programming test questions and answers
c programming quiz
c programming quiz pdf
Post a Comment
0 Comments