🧪 C/C MCQ Quiz Hub

C Multiple Choice Questions Set-1

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

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




2. Which classes allow primitive types to be accessed as objects?




3. When is std::bad_alloc exception thrown?




4. Which one of the following is not a fundamental data type in C++




5. Which of the following is a valid destructor of the class name “Country”




6. Which of the following correctly describes C++ language?




7. Which of the following keyword supports dynamic method resolution?




8. Which of the following is the most preferred way of throwing and handling exceptions?




9. Which of the following is not true about preprocessor directives




10. What’s wrong? while( (i < 10) && (i > 24))




11. A continue statement causes execution to skip to




12. What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6)




13. What’s wrong? for (int k = 2, k <=12, k++)




14. Which of the following is not recommended in a header file?




15. Which of the STL containers store the elements contiguously (in adjacent memory locations)?




16. Which of the following is not a standard exception built in C++.




17. What does STL stand for?#




18. What is the difference between overloaded functions and overridden functions?




19. Which one of the following is not a valid reserved keyword in C++




20. Each pass through a loop is called a/an




21. Which of the following is true about const member functions?




22. Which of the following relationship is known as inheritancerelationship?




23. If class A is friend of class B and if class B is friend of class C, which of the following is true?




24. direct access file is:




25. Which of the following is not a component of file system




26. Seek time is




27. Prime area’ in context of file system is defined as




28. In mulit-list organization




29. Which of the following is/are advantages of cellular partitioned structure




30. *ptr++ is equivalenet to




31. The conditional compilation




32. Originally ‘C’ was developed as




33. An inverted file




34. Which of the following is not a file operation:




35. Latency time is




36. The two types of file structure existing in VSAM file are




37. How many copies of a class static member are shared between objects of the class?




38. Which looping process checks the test condition at the end of the loop?




39. The default access level assigned to members of a class is _________




40. Which of the following correctly describes the meaning of‘namespace’ feature in C++?




41. Which of the following correctly describes the meaning of ‘namespace’ feature in C++?




42. Which of the following language is not supported by C++?




43. class derived: public base1, public base2 { } is an example of




44. Which of the following languages is a subset of C++ language?




45. How do we declare an ‘interface’ class?




46. How do we declare an abstract class?




47. Which of the following is not an advantage of secondary memory




48. What happens when a pointer is deleted twice?




49. Which of the following language feature is not an access specifier in C++?




50. Expression C=i++ causes