Which symbol is used to begin a line comment in C?
2026
Which symbol is used to begin a line comment in C?
Answer: A. // — ConceptComments are explanatory text that the C implementation removes during translation, so they do not become executable program statements. C provides…
- A.
// - B.
/* */ - C.
# - D.
--
Attempted by 33 students.
Show answer & explanation
Correct answer: A
Concept
Comments are explanatory text that the C implementation removes during translation, so they do not become executable program statements.
C provides line-comment syntax for text that continues to the next newline and block-comment syntax for text enclosed by paired delimiters.
Application
The token // starts a line comment. Every character after // on that source line is part of the comment until the next newline.
Contrast
The pair
/* ... */delimits a block comment and uses both an opening and a closing marker.The symbol
#introduces preprocessing directives such as#include.The token
--is the decrement operator in C.
Result
Therefore, the symbol used to begin a line comment in C is //.