Vidyalelo
C Programming · Q2

C Fundamentals

Programming · C Programming · question 2

Q2

Which character is used to indicate the end of a statement in C?

A.
.
B.
;
Answer
C.
:
D.
,

Answer: Option B

Solution

Answer: Option B
Solution:
The character used to indicate the end of a statement in C is ;. This semicolon is a crucial part of C syntax as it separates statements and tells the compiler where one statement ends and the next one begins.

So, the correct answer is:

Option B: ;

In C programming, you terminate a statement with a semicolon. For example:

#include <stdio.h>
int main() {
  int x = 5;
  printf("Hello, World!");
  return 0;
}


In the above code, the semicolon at the end of each line signifies the end of the respective statement.