Basic C Programming MCQ Questions and Answers
Practice ModeShowing 10 of 198 questions
Q61
Consider the following program fragment
if (a > b)
printf ("a > b) ;
else
printf ("else part");
printf ("a <= b");
a < = b will be printed if
Answer: Option
Q62
The body of the following for loop
for {putchar ('a'); putchar (0); putchar ('c')}
will be executed
Answer: Option A
Q63
The following statement
if (a > b)
if (c > b)
printff("one");
else
if (c == a) printf ("two);
else printf ("three");
else printf ("four");
Answer: Option D
Q64
The above statement can never print
Answer: Option B
Q65
The following program fragment
int x = 4, y = x, i;
for (i = 1; i < 4; ++i)
x += x;
outputs an integer that is same as
Answer: Option A
Q66
Choose the correct statements.
Answer: Option
Q67
Consider the declaration
static char hello [] = "hellow";
The output of printf ("%s\n", hellow);
will be the same as that of
Answer: Option
Q68
If storage class is missing in the array definition, by default it will be taken be
Answer: Option D
Q69
The following program fragment
int x[5][5], i, j;
for (i = 0; i < 5; ++i)
for (j = 0; j < 5 ; j++)
x[i][j] = x[j][i];
Answer: Option B
Q70
Which of the following features of C is means provide reliable access to special memory locations?
Answer: Option C