MC With Answers
MC With Answers
8. What is C Tokens?
A. The smallest individual units of c program B. The basic element recognized by the compiler
C. The largest individual units of program D. A & B Both
Answer : D
9. What is Keywords?
A. Keywords have some predefine meanings and these meanings can be changed.
B. Keywords have some unknown meanings and these meanings cannot be changed.
C. Keywords have some predefine meanings and these meanings cannot be changed.
D. None of the above
Answer : C
13. What will be the output of the following arithmetic expression ? 5+3*2%10‐8*6
a) ‐37 b) ‐42 c) ‐32 d) ‐28
Ans: a
15. What will be the output of the following statements ? int i = 1,j; j=i‐‐‐ ‐2; printf("%d",j);
a) error b) 2 c) 3 d) ‐3
Ans: c
16. What will be the output of the following statements ? int i = 3; printf("%d%d",i,i++);
a) 34 b) 43 c) 44 d) 33
Ans: b
27.What is the type of the below assignment expression if x is of type float, y is of type int? y=x
+ y;
a) int b) float c) there is no type for an assignment expression d) double
Answer: a
29. Choose the function that is most appropriate for reading in a multi-word string?
A - strnset() B - scanf() C - strchr() D - gets()
41. . Which data type is suitable for storing a number like? 10.0000000001
a) int b) float c) double d) both float and double
Answer: c
42. Execution of a program starts with
a) #include statement b) Pre-processor directive c) Main() d) None of the above
43. The output of the code below is
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
a) hi b) hello c) no d) none of the mentioned
Answer: a