100 Multiple Choice Questions in C Programming MCQs
100 Multiple Choice Questions in C Programming MCQs
100 Multiple Choice Questions in C Programming MCQs
4. C is a ___ language
a) High Level
b) Low Level
c) Middle Level
d) Machine Level
Ans: c
2
17. What will be the maximum size of a float variable?
a) 1 byte
b) 2 bytes
c) 4 bytes
d) 8 bytes
Ans: c
4
33. Operators have precedence. Precedence determines which operator is
a) faster
b) takes less memory
c) evaluated first
d) takes no arguments
Ans: c
43. Which pair of functions below are used for single character I/O.
a) Getchar() and putchar()
b) Scanf() and printf()
c) Input() and output()
d) None of these
Ans: a
44. The printf() function retunes which value when an error occurs?
a) Positive value
b) Zero
c) Negative value
d) None of these
Ans: c
6
49. Symbolic constants can be defined using
a) # define
b) const
c) symbols
d) None of these
Ans: b
52. malloc() function used in dynamic allocation is available in which header file?
a) stdio.h
b) stdlib.h
c) conio.h
d) mem.h
Ans: b
56. What should be the expression return value for a do-while to terminate
a) 1 b) 0
c) -1 d) NULL
Ans: b
7
57. Which among the following is a unconditional control structure
a) do-while
b) if-else
c) goto
d) for
Ans: c
60. Which of the following header file is required for strcpy() function?
a) string.h
b) strings.h
c) files.h
d) strcsspy()
Ans: a
62. The conversion characters for data input means that the data item is
a) An unsigned decimal integer
b) A short integer
c) A hexadecimal integer
d) A string followed by white space
Ans: b
64. Which of the following is a key word is used for a storage class
a) printf b) external
c) auto d) scanf
Ans: c
8
65. In the C language 'a’ represents
a) a digit
b) an integer
c) a character
d) a word
Ans: c
68. A Link is
a) a compiler
b) an active debugger
c) a C interpreter
d) a analyzing tool in C
Ans: d
70. In C, a Union is
a) memory location b) memory store
c) memory screen d) None of these
Ans: b
71. When the main function is called, it is called with the arguments
a) argc b) argv
c) None of these d) both a & b
Ans: d
9
73. C allows arrays of greater than two dimensions, who will determined this
a) programmer
b) compiler
c) parameter
d) None of these
Ans: b
77. If the size of the array is less than the number of initializers then,
a) Extra values are being ignored
b) Generates an error message
c) Size of Array is increased
d) Size is neglected when values are given
Ans: a
79. A Structure
a) can be read as a single entity
b) cannot be read as a single entity
c) can be displayed as a single entity
d) has member variables that cannot be read individually
Ans: b
84. If you don’t initialize a static array, what will be the element set to?
a) Zero
b) A floating point
c) An undetermined value
d) None of these.
Ans: a
86. The process of translating a source program into machine language is a function
of:
a) Compiler b) Translator
c) Assembler d) None of these.
Ans: a
91. A function is a subroutine that may include one or more ____________ designed to perform a specific task.
a) Functions
b) Statements
c) Libraries
d) Data types.
Ans:b
12
97. What is the control character for "a decimal integer".
a) %c
b) %d
c) %i
d) %p
Ans: b
98. What is the control character for "a floating point number".
a) %c
b) %d
c) %i
d) %f
Ans: d
99. C supports the ______ statement to branch unconditionally from one point to another in the program.
a) continue
b) goto
c) break
d) for
Ans: b
13