🧪 C/C MCQ Quiz Hub

C Programming MCQS Set-1

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

1. Wrapping data and its related functionality into a single entity is known as ____________




2. How structures and classes in C++ differ?




3. What does polymorphism in OOPs mean?




4. Which concept allows you to reuse the written code?




5. Which of the following explains Polymorphism?




6. Which of the following shows multiple inheritances?




7. How access specifiers in Class helps in Abstraction?




8. C++ is ______________




9. What does modularity mean?




10. 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;} }




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




12. 2. Which of the following is not a type of Constructor?




13. Which of the following is correct?




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




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




16. Which of the following cannot be a friend?




17. Why references are different from pointers?




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




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




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




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




22. Which of the following is an abstract data type?




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




24. Which of the following explains the overloading of functions?




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




26. Which operator is overloaded for a cout object?




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




28. Which concept is used to implement late binding?




29. Which of the following is correct?




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




31. Which of the following is a static polymorphism mechanism?




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




33. Which of the following is not a type of inheritance?




34. What happens if a class does not have a name?




35. 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




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




37. Which of the following is correct?




38. Which of the following is correct in C++?




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




40. Which of the following is correct?




41. Which of the following is correct about new and malloc?




42. What is virtual inheritance?




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




44. 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; }




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