Important MCQ

A single-line comment in C++ starts with

Q.A single-line comment in C++ starts with

A) /*
B) --
C) #
D) //
Correct Answer:
Option D
Detailed Explanation:
D) // is correct. A C++ program starts execution in main(). Statements normally end with semicolons; // and /*...*/ are comments, and the compiler translates source code into machine code.