What is syntax of defining a destructor of class A option 1 a option 2 A A option 3 a option 4 a

C++ Multiple Choice Questions

MCQ Based on Basics of C++

1] #include

Which of the following is the correct syntax to add the header file in the C++ program?

  1. #include
  2. #include "userdefined.h"
  3. "userdefined.h"
  4. Both A and B

Answer: D

Explanation: To include the herder files in the C++ program user can use any of the following given syntax.

Or

2] Which of the following is the correct syntax to print the message in C++ language?

  1. cout

Chủ Đề