Home
MCQS
C/C MCQ Quiz Hub
C MCQS Interview Questions
Choose a topic to test your knowledge and improve your C/C skills
1. What are different storage class specifiers in C?
auto
static
register
All of the above
2. What is scope of a variable?
Scope of variable is declaration of variable
Scope of variable is calling of variable
Scope of a variable is the part of the program where the variable may direc
None of the above
3. How will you print “Hello World†without semicolon?
pass printf statement in conditional statements
pass printf statement in while and break the loop
Both of the above
None of the above
4. Swapping of two variable require minimum
two variable
three variable
one variable
None of the above
5. When should we use pointers in a C program?
To get address of a variable
For achieving pass by reference in C
To implement link list data structure
All of the above
6. What is NULL pointer?
NULL is used to indicate that the pointer doesnt point to a valid location.
NULL is used to indicate the end of link list
NULL pointer cannot point anything
None of the above
7. What is Dangling pointer ?
pointer point the deallocated memory
pointer point to the NULL memory
pointer point to the valid memory area
All of the above
8. What is memory leak?
Memory is free by the programmers after use of Heap memory
Memory leak occurs when programmers create a memory in heap and forget to d
Both of the above
None of the above
9. What are local static variables ?
A local static variable is a variable whose lifetime does not end with a fu
It extends for the lifetime of complete program
All calls to the function share the same copy of local static variables
All of the above
10. What is difference between i++ and ++i?
i++ is prefix while ++i is postfix
i++ is postfix while ++i is prefix
Both of the above
None of the above
11. What is difference between i++ and ++i?
i++ return value first then increment the i
#NAME?
#NAME?
1 and 3 are true
12. Execution of every c program starts with-
first line
main function
anywhere
None of the above
13. smallest executable code in c is -
{}
void main(){}
main
All of the above
14. Types of loops in c -
for
while
do while
All of the above
15. Entry control loop are -
Every loop is entry control loop
those where condition are check at entry level
those where condition are check at exit level
All of the above
16. Exit control loops are those
in which condition are check at entry level
in which condition are check at exit level
Both of the above
None of the above
17. Entry control loops are-
for loop
while loop
do while loop
1 and 2
18. Exit control loop are -
for loop
while loop
do while loop
All of the above
19. what is HEAP area ?
it is used for the objects allocated dynamically
it is used for the objects deallocated dynamically
HEAP is a memory allocation by int
None of the above
20. What is stack area ?
It is used to store local variables and arguments of a method
It is used to allocate dynamic memory
Both of the above
None of the above
21. If we allocate memory by malloc in c then it goes to
Heap area
stack area
virtual memory
None of the above
22. int a=1; memory allocation is a type of
Heap
stack
both
none
23. How many keywords are there in c ?
34
33
32
None of the above
24. Which are the basic data type in c ?
int
float
char
All of the above
25. void in c language is -
keyword
function
special data type without any value
void can be used in place of double
26. fabs() in c programming are in-
math header file
stdlib header file
stdio file
iostream file
27. what is the cyclic nature of data type in c ?
they goes infinite when exceed range
they give error when exceed range
they goes back in cyclic form when exceed range
None of the above
28. Is nested loop exist in c programming-
Yes
No
Depend on compiler
updated version of c language support nested loop
29. Nested loop is
two loop , one by one run
one loop is always a nested loop
exit control is always a nested loop
loop inside loop
30. What is the difference between declaration and definition of function in c ?
both are same
we always require declaration before definition
definition time we allocate memory
None of the above
31. For recursion we require
stack area
heap area
queue area
None of the above
32. we can create loop by
for loop
goto statement
recursion
All of the above
33. exit() function are used to-
break the loop
exit the function call
exit the whole program
None of the above
34. exit() function were define in -
process header file
stdlib header file
Both of the above
None of the above
35. which of the following are the modifier in c ?
int
float
char
None of the above
36. which of the following are modifier in c ?
short
long
signed
All of the above
37. for creating random number, we use
rand() function
random() function
randno() function
All of the above
38. rand() function are used to generate random number during execution of program, In which header file it is define ?
math
stdio
stdlib
process
39. Is that possible to store 32768 in an int data type variable ?
Yes
No
Depend on compiler
updated version of c language support nested loop
40. for storing number 32768 as a integer, which one is valid ?
int
long int
Integer
None of the above
41. Null pointers are possible to use in -
As an error value
As a sentinel value
To terminate indirection in the recursive data structure
All of the above
42. for any type of looping we require-
initialization
condition
increment and decrement
All of the above
43. without the curly braces, the body of while loop is upto
two line
one line
no body of while
None of the above
44. int a this type of declaration is treated as:-
static
extern
auto
global
45. if the declaration of variable is outside the function then it is treated as
global variable
static variable
long variable
register variable
46. is it possible to create customized header file ?
YES
NO
Can not say
None of the above
47. is graphical programming possible by c language ?
No
Yes
Depend on compiler
None of the above
48. Canvas programming in c are those which deal with the
header file
recursion
memory management
Geometrical graphics
49. c language is-
modular programming
object oriented programming
threading programming
All of the above
50. Ascii value of A is -
97
65
66
1
Submit