πŸ§ͺ C/C MCQ Quiz Hub

C Multiple Choice Questions Set-2

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

ο»ΏThe statement i++; is equivalent to





βœ… Correct Answer: 1

In C language, a hexadecimal number is represented by writing





βœ… Correct Answer: 2

Which of the following library function below by default aborts the program?





βœ… Correct Answer: 4

If a member needs to have unique value for all the objects of that same class, declare the member as





βœ… Correct Answer: 1

Value of ix+j, if i,j are integer type and ix long type would be





βœ… Correct Answer: 2

Which of the following below can perform conversions between pointers to related classes?





βœ… Correct Answer: 3

How do we define a constructor?





βœ… Correct Answer: 3

Vtables





βœ… Correct Answer: 4

When class B is inherited from class A, what is the order in which the constructers of those classes are called





βœ… Correct Answer: 1

Which of the following is the most general exception handler that catches exception of any type?





βœ… Correct Answer: 1

Which of the following is the correct syntax of including a user defined header files in C++?





βœ… Correct Answer: 3

Which of the following is a correct identifier in C++?





βœ… Correct Answer: 3

Which of the following is called address





βœ… Correct Answer: 2

Which of the following is used for comments in C++?





βœ… Correct Answer: 3

What are the formal parameters in C++?





βœ… Correct Answer: 1

What are the formal parameters in C++?





βœ… Correct Answer: 2

Which function is used to read a single character from the console in C++?





βœ… Correct Answer: 1

Which function is used to write a single character to console in C++?





βœ… Correct Answer: 1

What are the escape sequences?





βœ… Correct Answer: 1

Which of the following escape sequence represents carriage return?





βœ… Correct Answer: 1

Which of the following escape sequence represents tab?





βœ… Correct Answer: 1

Who created C++?





βœ… Correct Answer: 1

Which of the following is called insertion/put to operator?





βœ… Correct Answer: 1

Which of the following is called extraction/get from operator?





βœ… Correct Answer: 2

A language which has the capability to generate new data types are called ___________





βœ… Correct Answer: 1

Wrapping data and its related functionality into a single entity is known as _____________





βœ… Correct Answer: 2

How structures and classes in C++ differ?





βœ… Correct Answer: 1

What does polymorphism in OOPs mean?





βœ… Correct Answer: 1

Which concept allows you to reuse the written code?





βœ… Correct Answer: 3

Which of the following shows multiple inheritances?





βœ… Correct Answer: 3

How access specifiers in Class helps in Abstraction?





βœ… Correct Answer: 2

C++ is ______________





βœ… Correct Answer: 4

What does modularity mean?





βœ… Correct Answer: 2

Which of the following class allows to declare only one object of it?





βœ… Correct Answer: 3

Which of the following is not a type of Constructor?





βœ… Correct Answer: 1

Which of the following is correct?





βœ… Correct Answer: 2

Out of the following, which is not a member of the class?





βœ… Correct Answer: 2

What is the other name used for functions inside a class?





βœ… Correct Answer: 2

Which of the following cannot be a friend?





βœ… Correct Answer: 3

Why references are different from pointers?





βœ… Correct Answer: 4

Which of the following provides a programmer with the facility of using object of a class inside other classes?





βœ… Correct Answer: 2

How many types of polymorphism are there in C++?





βœ… Correct Answer: 2

How run-time polymorphisms are implemented in C++?





βœ… Correct Answer: 4

How compile-time polymorphisms are implemented in C++?





βœ… Correct Answer: 3

Which of the following is an abstract data type?





βœ… Correct Answer: 3

Which concept means the addition of new components to a program as it runs?





βœ… Correct Answer: 3

Which of the following explains the overloading of functions?





βœ… Correct Answer: 3

Which of the following approach is used by C++?





βœ… Correct Answer: 2

Which operator is overloaded for a cout object?





βœ… Correct Answer: 2

Which of the following cannot be used with the virtual keyword?





βœ… Correct Answer: 2

Which concept is used to implement late binding?





βœ… Correct Answer: 1

Which of the following is correct?





βœ… Correct Answer: 4

Which of the following supports the concept that reusability is a desirable feature of a language?





βœ… Correct Answer: 4

Which of the following is a static polymorphism mechanism?





βœ… Correct Answer: 4

Which of the following is true? I) All operators in C++ can be overloaded. II) The basic meaning of an operator can be changed.





βœ… Correct Answer: 4

Which of the following is not a type of inheritance?





βœ… Correct Answer: 3

What happens if a class does not have a name?





βœ… Correct Answer: 2

Which of the following statement is true? I) In Procedural programming languages, all function calls are resolved at compile-time II) In Object Oriented programming languages, all function calls are resolved at compile-time





βœ… Correct Answer: 1

Which members are inherited but are not accessible in any case?





βœ… Correct Answer: 1

Which of the following is correct?





βœ… Correct Answer: 4