answersLogoWhite

0

You mean you forgot a bracket? That's syntactical error.

bad: while (i++ < argc printf ("%d %s\n", i, argv[i]);

good: while (i++ < argc) printf ("%d %s\n", i, argv[i]);

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Compare Do-While with While Statements?

A Do-While loop looks like this: do { loop body } while (condition); and a While loop looks like this: while (condition) { loop body } The main difference is that the loop body is always run once in the Do-While loop, then the condition is checked to see if the loop should keep running. In a While loop, the condition is checked first, and it will not run the loop body at all if the condition is false.


Is a while loop a pre-condition or post condition?

The while loop is a pre-condition loop.&nbsp; It tests the condition at the beginning of each loop, executes the loop if it is true, and goes back to the test after executing each iteration.


How do you convert a while loop to a do loop?

input:while (condition) statementoutput:for (;condition;) statementor, if you mean do-while:do { if (condition) statement } while (condition);


Is it possible to use a for loop in place of a while loop?

Yes. while loop consist of only condition statement to make for loop look as while loop we can use syntax shown below: for(;condition;) eg: for(;i&lt;=n;)


What are the differences between while and do while?

while- It will wrok only if the condition is correct if not it wont excute the body of the loop do-while: In some cases we want that body of the loop and the condition may fails so the loop want to print so the do while loop first excute body of the loop and next it checks the condition it continues until the condition becomes false


Difference between while and do while loops in java?

The most important differences are: a. The while loop starts with a condition whereas the condition is the line of code in case of a do while loop b. The do while loop is guaranteed to run the loop body atleast once even if the condition is an impossible to satisfy but such a guarantee is not available with the normal while loop


What is main different between do while and while?

If you want to execute a statement which is in while loop at least one time you can use do- while loop. this is why because initially first statements will be executed then condition will be checked. but in case of while first condition will be check then statements will be executed


What is the difference between do while and while loop in java?

A do-while loop guarantees the body of the loop will execute at least once. A while loop might not execute at all. // this code will execute, even though the condition test will always evaluate to false do { // stuff }while(false); // this code will never execute because the condition test will always evaluate to false while(false) { // stuff }


Difference between do while and for loop?

for loop it consists of 3 parts 1. initialization 2. condition 3. incrementation like for(i=1;i&lt;=10;i++).This loop executes 10 times. While loop: This is an entry check loop. First it checks for the condition and if the condition is true then only loop will be executed and this continues till the condition becomes false. ex: i=0; while(i&lt;10) {i++; } This loop executes 10 times. Do loop: This is an exit check loop. This executes the loop at least once even when the condition is false. ex: 1=0; do { i++; }while(i&lt;10);


What r conditional loops and unconditional loops in c?

A conditional loop will only continue to loop while the given condition is true: while( i &lt; 10 ) { ... } An unconditional loop either has no condition (a GOTO loop), or the condition is guaranteed to always evaluate to true: while( true ) { ... }


Difference between for and while loop not in syntactically?

Well 'while' goes like this: while (condition) statement 'for': for (initialize; condition; after-each-loop) statement


Which loop does not have an entry condition in C plus plus?

The only loop that does not require an entry condition is the procedural goto loop: again: /*...*/ goto again; Although a do-while loop has no entry condition per-se, it still requires a mandatory entry condition into the second and all subsequent iterations. do { /*...*/} while (true); // mandatory entry condition into all but the 1st iteration And although a for loop's condition is optional, it is implicit: for (;;) {/*..*/} // implicit for ever loop for (;true;) {/*...*/} // explicit for ever loop