Why is a semicolon (;) put at the end of every program statement?



Why is a semicolon (;) put at the end of every program statement?..

Answer / Jamna Prasad

A semicolon (;) is used in C to mark the end of a statement. It enables the compiler to distinguish between individual statements and avoid syntax errors. Without semicolons, the compiler might not correctly understand where one statement ends and another begins.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is scope of variable in c?

1 Answers  


Can the “if” function be used in comparing strings?

1 Answers  


When should the volatile modifier be used?

1 Answers  


what is the little endian and big endian?

1 Answers  


Why do we need functions in c?

1 Answers  


What are different types of pointers?

1 Answers  


What is difference between %d and %i in c?

1 Answers  


What is pivot in c?

1 Answers  


What is strcmp in c?

1 Answers  


how to find greatet of 10 numbers without using array?

4 Answers  


What is a ternary operator in c?

1 Answers  


What are .h files and what should I put in them?

3 Answers  


Categories