Free Online Directory MCQs on Patriot Day (September 11) - MCQs Answers

MCQs on Patriot Day (September 11)

19 min Score: 0 Attempted: 0/19 Subscribe
1. 20 min Score: 0 Attempted: 0/20 Subscribe
1. Which of the following is a correct way to declare a pointer in C/C++?






2. 2. What is the output of the following code snippet? printf(“%d”, 5 + 10 * 2);





3. 3. Which of the following keywords is used to define a constant in C/C++?





4. 4. What is the purpose of the #include directive in C/C++?





5. 5. Which operator is used to access members of a structure in C/C++?





6. 6. In C/C++, which of the following is the correct way to allocate memory dynamically?





7. 7. What does the sizeof operator return?





8. 8. Which of the following is a valid declaration of an array in C/C++?





9. 9. What will be the output of the following code snippet?
for (int i = 0; i < 5; i++) { printf("%d ", i); }






10. 10. Which of the following is not a feature of Object-Oriented Programming?





11. 11. What is the default access specifier for members of a class in C++?





12. 12. Which function is used to get the length of a string in C?





13. 13. What is the return type of the main() function in C/C++?





14. 14. Which of the following is used to terminate a loop in C/C++?





15. 15. In C/C++, how do you declare a function that returns an integer and takes two integers as parameters?

17. 17. Which of the following is the correct syntax for a single-line comment in C/C++?









18. 19. Which of the following operators cannot be overloaded in C++?





19. 20. In C++, what does the virtual keyword indicate?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials