πŸ§ͺ C/C MCQ Quiz Hub

C Programming MCQS Set-1

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

ο»Ώ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 explains Polymorphism?





βœ… 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 feature of OOPs is not used in the following C++ code? class A { int i; public: void print(){cout<<"hello"<<i;} } class B: public A { int j; public: void assign(int a){j = a;} }





βœ… Correct Answer: 4

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





βœ… Correct Answer: 3

2. 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: 3

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

Which of the following is correct in C++?





βœ… Correct Answer: 2

Which of the following is used to make an abstract class?





βœ… Correct Answer: 4

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 will be the output of the following C++ code? #include <iostream> using namespace std; class A{ public: A(){ cout<<"Constructor called "; } ~A(){ cout<<"Destructor called "; } }; int main(int argc, char const *argv[]) { A *a = new A[5]; delete a; return 0; }





βœ… Correct Answer: 4

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





βœ… Correct Answer: 2