C/C MCQ Quiz Hub

C programming language MCQ Questions Set 1

Choose a topic to test your knowledge and improve your C/C skills

 Which of the following is correct?





✅ Correct Answer: 2

Which of the following is correct about new and malloc?





✅ Correct Answer: 3

What is virtual inheritance?





✅ Correct Answer: 1

What is the difference between delete and delete[] in C++?





✅ Correct Answer: 3

What is the correct syntax of declaring array of pointers of integers of size 10 in C++?





✅ Correct Answer: 2

Which of the following type is provided by C++ but not C?





✅ Correct Answer: 2

Which of the following feature is not provided by C?





✅ Correct Answer: 3

Which of the following is not a fundamental type is not present in C but present in C++?





✅ Correct Answer: 3

What is the size of a boolean variable in C++?





✅ Correct Answer: 1

Which of the following is C++ equivalent for scanf()?





✅ Correct Answer: 1

Which of the following is C++ equivalent for printf()?





✅ Correct Answer: 2

Which of the following is the correct difference between cin and scanf()?





✅ Correct Answer: 2

Which of the following is an exit-controlled loop?





✅ Correct Answer: 3

Which of the following is an entry-controlled loop?





✅ Correct Answer: 2

In which part of the for loop termination condition is checked? for(I;II;III) {IV}





✅ Correct Answer: 2

What is dynamic binding?





✅ Correct Answer: 1

What is static binding?





✅ Correct Answer: 2

What is name mangling in C++?





✅ Correct Answer: 1

Which of the following syntax for declaring a variable of struct STRUCT can be used in both C and C++?





✅ Correct Answer: 1

What if we define the below structure in C and C++?





✅ Correct Answer: 1

Which of the following is the scope resolution operator?





✅ Correct Answer: 3

Which of the following operator has left to right associativity?





✅ Correct Answer: 3

Which of the following is accessed by a member function of a class?





✅ Correct Answer: 2

What is the size of a character literal in C and C++?





✅ Correct Answer: 1

What is the size of a character type in C and C++?





✅ Correct Answer: 3

Which of the following is correct?





✅ Correct Answer: 3

Which of the following is correct?





✅ Correct Answer: 1

Which of the following statement is correct?





✅ Correct Answer: 2

Which of the following is correct about this pointer in C++?





✅ Correct Answer: 2

Which of the following operator is used with this pointer to access members of a class?





✅ Correct Answer: 3

Why this pointer is used?





✅ Correct Answer: 1

What is the other name of compile-time polymorphism?





✅ Correct Answer: 1

What is the other name of run-time polymorphism?





✅ Correct Answer: 2

Which of the following is correct about static polymorphism?





✅ Correct Answer: 1

Which of the following is correct about dynamic polymorphism?





✅ Correct Answer: 2

What is std in C++?





✅ Correct Answer: 2

Which of the following syntax can be used to use a member of a namespace without including that namespace?





✅ Correct Answer: 1

What is the size of wchar_t in C++?





✅ Correct Answer: 4

Pick the odd one out.





✅ Correct Answer: 1

Which data type is used to represent the absence of parameters?





✅ Correct Answer: 3

What does ‘\a’ escape code represent?





✅ Correct Answer: 1

Which type is best suited to represent the logical values?





✅ Correct Answer: 2

Identify the user-defined types from the following?





✅ Correct Answer: 3

The value 132.54 can be represented using which data type?





✅ Correct Answer: 1

When a language has the capability to produce new data type mean, it can be called as





✅ Correct Answer: 2

Pick the odd one out.





✅ Correct Answer: 3

Is bool a fundamental data type in C++?





✅ Correct Answer: 1

Find the odd one out.





✅ Correct Answer: 4

What happens when a null pointer is converted into bool?





✅ Correct Answer: 3

What is the value of the bool? bool is_int(789.54)





✅ Correct Answer: 2

What happens when a null pointer is converted into bool?





✅ Correct Answer: 3