Top 50+ Solved C Programming Basic MCQ Questions Answer
Q. What is constant?
a. constants have fixed values that do not change during the execution of a program
b. constants have fixed values that change during the execution of a program
c. constants have unknown values that may be change during the execution of a program
d. none of the above
Q. Which is the right way to declare constant in C?
a. int constant var =10;
b. int const var = 10;
c. const int var = 10;
d. b & c both
Q. In switch statement, each case instance value must be _______?
a. constant
b. variable
c. special symbol
d. none of the above
Q. What is the work of break keyword?
a. halt execution of program
b. restart execution of program
c. exit from loop or switch statement
d. none of the above
Q. What is function?
a. function is a block of statements that perform some specific task.
b. function is the fundamental modular unit. a function is usually designed to perform a specific task.
c. function is a block of code that performs a specific task. it has a name and it is reusable
d. all the above
Q. Which one of the following sentences is true ?
a. the body of a while loop is executed at least once.
b. the body of a do ... while loop is executed at least once.
c. the body of a do ... while loop is executed zero or more times.
d. a for loop can never be used in place of a while loop.
Q. Which one of the following is not a linear data structure?
a. array
b. binary tree
c. queue
d. stack
Q. Recursive functions are executed in a?
a. first in first out order
b. load balancing
c. parallel fashion
d. last in first out order
Q. To represent hierarchical relationship between elements, which data structure is suitable?
a. priority
b. tree
c. dqueue
d. all of the above
Q. Which of the following data structure is linear type?
a. strings
b. queue
c. lists
d. all of the above
Q. The statement printf("%c", 100); will print?
a. prints 100
b. print garbage
c. prints ascii equivalent of 100
d. none of the above