Which character is used to indicate the end of a statement in C?
a) , (comma)
b) : (colon)
c) ; (semicolon)
d) . (period)
Answer:
c) ; (semicolon)
Explanation:
In C, the semicolon (;
) is used to indicate the end of a statement. It is a crucial syntax element in C programming, as it separates individual statements and allows the compiler to understand where one statement ends and another begins.
Proper use of semicolons is essential for ensuring that your C programs are correctly structured and compiled without syntax errors.