answersLogoWhite

0

A semi-colon is used in a do while statement for the same reason that it is used in any other statement. The rules of C and C++, as well as Java, require that every statement be terminated with a semi-colon.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you add special effects to text in HTML?

Drop CapExample:This is an example of a drop cap effect using the float property.Mouseover TitleExample:Paragraph text here.Scrolling TextExample:


Does every line in C program end with a semicolon?

Yes, but it will be difficult, because you will need to explicitly declare any library functions and constants that you will need, and often there are many such declarations. If you are talking about a header file specific to your program, the answer is still yes; simply declare your functions and constants before you use them. This is often done in single file program that are provided on the Internet - the file will contain includes for "standard" headers, but none for specific program related headers - and the order of functions will simply be backwards, with main() at the end - or the function will be declared at the top, with main() immediately after the declarations.


Can a continue statement be used in a switch statement?

If you have a loop in your switch statement or around your switch statement, you can use the continue statement in that. You cannot use a continue statement outside of a loop (do, for, or while).


What is The statements written by the programmer?

In languages that use a C-style syntax (e.g., C, C++ and Java) all code is written using expressions. Expressions may be combined to produce more complex expressions, however an expression or group of expressions only becomes a statement when terminated by a semi-colon. A group of statements enclosed by braces {} is known as a compound statement or code block.


Can you use conditional operator in cout statement?

Yes, but 'cout' is not a statement! Examples for statements: null-statement, block, expression, if-else, while, do-while, for, continue, switch, break, return.