Home

C Programming MCQ Question with Answer

C Programming MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download C Programming MCQ Question Answer PDF

Question No : 29
A continue statement causes execution to skip to

the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop

Question No : 30
What's wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);

the question mark should be an equal sign
the first semicolon should be a colon
there are too many variables in the statement
the conditional operator is only used with apstrings

Question No : 31
What's wrong? for (int k = 2, k <=12, k++)

the increment should always be ++k
the variable must always be the letter i when using a for loop
there should be a semicolon at the end of the statement
the commas should be semicolons

Question No : 32
Which of the following is not recommended in a header file?

Type definitions (typedefs)
Class definitions
Function definitions
Template definitions

Question No : 33
Which of the STL containers store the elements contiguously (in adjecent memory locations)?

std::vector
std::list
std::map
std::set

Question No : 34
Which of the following is not a standard exception built in C++.

std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid

Question No : 35
What does STL stand for?

Simple Template Library
Standard Template Library
Static Type Library
Single Type-based Library