?
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:
So, the correct answer is:
Option B:
Here's an example of a single-line comment in C:
//. 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;
}
Join the Discussion
Login to post a comment or share your explanation.
Login