ExamVeda
Login
Home
This question belongs to C Program C Fundamentals
C Fundamentals
?

Which character is used to represent a comment in C code?

Answer & Solution
Correct Answer: Option B
The character used to represent a comment in C code is Option B: //. In C, the double forward slash (//) is used to begin a single-line comment. Comments are used for adding explanations or notes within the code that are ignored by the compiler and are solely for human readability.

So, the correct answer is:
Option B: //

Here's an example of a single-line comment in C:
int main() {
    // This is a single-line comment
    printf("Hello, World!");
    return 0;
}
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.