answersLogoWhite

0


Best Answer

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

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why do you use semi colon in do while statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.

Related questions

When to use a semi colon?

THis is a semi colon ;


Do you use a colon or semi colon to write a formal letter?

i would use a semi colon ; just because that is More formal.


When do use semi colon?

You use a semi colon after a word for example:Shoneka writes poertry;she is published in a litery magazine.


When do you use semi colon?

You use a semi colon after a word for example:Shoneka writes poertry;she is published in a litery magazine.


When do i use a semi colon?

When you feel like it


In the sentence please be quiet you are being too noisy would you use a comma or a semi colon between quiet and you?

In the sentence "please be quiet; you are being too noisy," you would use a semicolon to separate the two independent clauses.


Why do you use semi colon for?

To separate independent clauses


When using a colon as punctuation in a sentence how many times do you space after it?

You use one space after a colon or semi-colon.


When could you use a semi-colon in a compound sentence?

You can use a semi-colon in a compound sentence when you want to connect two closely related independent clauses without using a conjunction like "and" or "but". This can help to emphasize the relationship between the two clauses.


Why would you use a semi-colon instead of a period explain?

Because a semi colon replaces the word "but" which means it's more complex.


When do you use a colon and when do you use a semi colon in writing?

Use a colon to introduce a list or to connect two related sentences where the second explains or provides more information about the first. A semicolon is used to connect two independent clauses that are closely related in meaning.


How do you use semi colon in this sentence To make matters worse amongst the working class we're experiencing an economic downfall?

there is no semi colon usage