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 : 15
perror( ) function used to ?

Work same as printf()
prints the error message specified by the compiler
prints the garbage value assigned by the compiler
None of the above

Question No : 16
Bitwise operators can operate upon?

double and chars
floats and doubles
ints and floats
ints and chars

Question No : 17
What is C Tokens?

The smallest individual units of c program
The basic element recognized by the compiler
The largest individual units of program
A & B Both

Question No : 18
What is Keywords?

Keywords have some predefine meanings and these meanings can be changed.
Keywords have some unknown meanings and these meanings cannot be changed.
Keywords have some predefine meanings and these meanings cannot be changed.
None of the above

Question No : 19
If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?

const X* const
X* const
X*
X&

Question No : 20
Which classes allow primitive types to be accessed as objects?

Storage
Virtual
Friend
Wrapper

Question No : 21
When is std::bad_alloc exception thrown?

When new operator cannot allocate memory
When alloc function fails
When type requested for new operation is considered bad<  thisexception is thrown
When delete operator cannot delete teh allocated (corrupted) object