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

1.  Which of the following is correct?




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




3. What is virtual inheritance?




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




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




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




7. Which of the following feature is not provided by C?




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




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




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




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




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




13. Which of the following is an exit-controlled loop?




14. Which of the following is an entry-controlled loop?




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




16. What is dynamic binding?




17. What is static binding?




18. What is name mangling in C++?




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




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




21. Which of the following is the scope resolution operator?




22. Which of the following operator has left to right associativity?




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




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




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




26. Which of the following is correct?




27. Which of the following is correct?




28. Which of the following statement is correct?




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




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




31. Why this pointer is used?




32. What is the other name of compile-time polymorphism?




33. What is the other name of run-time polymorphism?




34. Which of the following is correct about static polymorphism?




35. Which of the following is correct about dynamic polymorphism?




36. What is std in C++?




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




38. What is the size of wchar_t in C++?




39. Pick the odd one out.




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




41. What does ‘\a’ escape code represent?




42. Which type is best suited to represent the logical values?




43. Identify the user-defined types from the following?




44. The value 132.54 can be represented using which data type?




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




46. Pick the odd one out.




47. Is bool a fundamental data type in C++?




48. Find the odd one out.




49. What happens when a null pointer is converted into bool?




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




51. What happens when a null pointer is converted into bool?