answersLogoWhite

0


Best Answer

while(<condition>)

{

statement block;

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

int main (int argc, char **argv)

{

int i= 0;

do printf ("%2d: %s\n", i, argv[i]); while(++i

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

do statement while (condition);

The statement is executed. Then the condition is checked. If true, then the process is repeated.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the rule or logic of syntax for do-while loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is logic behind bodmas rule?

i THINK THERE IS NO LOGIC BEHIND BODMAS RULE. IT IS JUST A CONVENTION.


What is the first rule in a structured loop?

First rule - you never talk about first rule of a structured loop. Haha i kid. It's to ensure that it will end cleanly and not run infinitely.


How does the rule of syntax help an individual to preficient in speaking skill?

preficient


What is the first Java syntax rule?

Put a ; at the end of each command;


The rule by which criteria need to be entered in the query grid are reffered to as?

Syntax


How do you use kirchhoff's voltage rule in complex circuits?

You apply the rule to each loop in the circuit individually, and each loop produces a separate equation. You solve the collection of equations for the individual loop currents.


You want many conditions to be satisfied for a single while loop how can you do it?

You can put as many conditional tests as you want in the while loop conditional location. As a rule, however, it is a better idea to simplify the conditions as much as possible so that the reader of the code has a better understanding of what is being accomplished. Once you start putting multiple conditions in a while loop with ANDs and ORs together, the logic can get complex and not well understood.


Is there any rule that if I use an If in a loop then i cant use that if in another loop?

If your question makes sense at all, and it is about programming, then the answer is no.


Why is syntax analysis is based on grammar?

Syntax analysis (parsing) is to determine a text is conform to a predefined rule. A rule is the format, the sequence, to compose an element or abstraction (words, fields, tokens, nodes in xml, area code in a sequence of digits, etc.). Grammar is a collection of these predefined rules.


What has the author Edwin Samuel Williams written?

Edwin Samuel Williams has written: 'Rule ordering in syntax' -- subject(s): Comparative and general Grammar, English language, Grammar, Comparative and general, Syntax


Three types of program errors and examples?

Syntax errors: errors due to the fact that the syntax of the language is not respected.(The first type of error is a syntax error. You already know that syntax errors are caused when you don ' t obey the syntax rules of C#. A common syntax rule you might make in the beginning is forgetting to terminate each program statement with a semicolon. Intellisense does an excellent job of catching syntax errors. While you may hate the squiggly linethat Intellisense displays, it ' s a lot easier for Intellisense to detect and isolate syntax errors than it is for you to do it yourself.)Semantic errors: errors due to an improper use of program statements.( Logic errors are those errors that remain after all the semantic and syntax errors have been removed. Usually, logic errors manifest themselves when the result the program produces doesn ' t match the result your test data suggest it should produce. Most of the time, logic errors are found in the Process . Logic errors occur when you implement the algorithm for solving the problem incorrectly. The key to fixing logic errors is to be able to reproduce the error consistently. A repeatable logic error is much easier to track down and fix than an error that appears to be occurring randomly. you will learn the details of using some of the tools Visual Studio provides to help you detect and isolate program bugs.))Logical errors: errors due to the fact that the specification is not respected(A semantic error occurs when you obey the syntax rules of the language but are using the statement out of context. For example, a sentence in English is expected to have a noun and a verb. Consider the sentence " The dog meowed. " This sentence does obey the rules of having a noun and a verb, but the context of the sentence is out of whack. Dogs don ' t meow, therefore the context of the statement is incorrect. The error message I showed you earlier: The name 'i' does not exist in the current context refers to a type of semantic error. There may well be a variable named i defined somewhere in the program, but it is not currently in scope. That is, you are trying to use i when it is out of scope.Intellisense does a good job of detecting semantic errors.)


Is language rule governed?

Yes, all language is governed by rules of grammar, punctuation, usage, syntax, context, and audience.