Which character is used to indicate the end of a statement in C?
A. .
B. ;
C. :
D. ,
Answer: Option B
Solution(By Examveda Team)
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.
Related Questions on C Fundamentals
What is the primary purpose of a function prototype in C?
A. Declare a variable
B. Declare a function
C. Define a function
D. Assign a value
What is the correct syntax for declaring a variable in C?
A. int variable_name;
B. variable_name = 5;
C. variable_name int;
D. int = variable_name;
Join The Discussion