C Language MCQS

30 very important C Language MCQs for test preparation


11. A variable, which is visible, only in the, function in, which it is, defined is, called: ______________

A) Static variable

B) Auto variable

C) External variable

D) Local variable


12. In the “loop structure” logical expression, is checked, at the: ________________________ of the loop.

A) Middle

B) Second

C) first

D) End


13. If an “array is used as function” argument, the array, is passed called: ______________

A) By name

B) The array cannot be used as function on argument

C) By value

D) By reference


14. “If” is necessary, to declare the, type of function, in the calling, program, if:

A) Function is not defined in the same file

B) Function is called number of times

C) Function returns an integer

D) Function returns a non-integer value


15. Which “escape character” can be used, to begin a new, line, in C:

A) a

B) m

C) n

D) b


16. “Input/output function” prototypes, and macros are, defined in, which header, file?

A) dos.h

B) conio.h

C) stdio.h

D) stdlib.h


17. What, is the purpose, of “flush()” function?

A) Flushes input/output buffer

B) flushes file buffer

C) Flushes all streams and specified streams

D) Flushes only specified stream


18. What, does the, following declaration, mean? int(*ptr)[10].

A) ptr is an array of 10 integers

b) ptr is an pointer to array

c) ptr is array of pointers to 10 integers.

d) ptr is a pointer to an array of 10 integers


19. What will be output of the following C program?

#include int main() (int goto=5;

Printf(“%d”,goto); return 0;}

A)^^

B) 23

C) 5

D) Errors


20. Output of the following C program fragment is. x=5; y=x++; printf(“%d %d”, x,y

A) 6, 5

B) 6, 6

C) 5, 6

D) 5, 5


Previous page 1 2 3Next page

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button