Basic C Programming MCQ
Basic C Programming MCQ
32. Pick the operators whole meaning is context dependent.
- *
- #
- &
- No such operator exists
34. The following code fragment
int x, y = 2 z, a;
x = (y * = 2) + (z = a = y);
Print ("%d", x);
- prints 8
- prints 6
- prints 6 or e depending on the compiler implementation
- is syntactically wrong
35. If n has the value 3, then the output of the statement printf("%d %d", n++, ++n);
- is 3 5
- is 4 5
- is 4 4
- is implementation dependent
37. Which of the following comments about the ++ operator are correct ?
- It is a unary operator
- The operand can come before or after the operator
- It cannot be applied to an expression
- It associated from the right
38. In standard C, trigraphs in the source program are translated
- before the lexical analysis
- after the syntax analysis
- before the recognition of escape characters in strings
- during the intermediate code generation phase
39. The expression 5 - 2 - 3 + 5 - 2 will evaluate to 18, if
- - is left associative and * has precedence over -
- - is right associateive and * has precedence over -
- - is right associative and - has precedence over *
- - is left associative and - has precedence over *
40. Printf ("%c", 100) ;
- prints 263
- prints the ASCII equivalent of 263
- rings the bell
- prints garbage