Sure.
for (i=0; i
or
i=0; do printf ("%d %s\n", i, argv[i]); while (i++
Yes, you can. Semicolon can be used almost in any part of program.
For clasesses it defines from which class to inherit. :: means area of visibility in certain name space.
semicolon ';' (Not applicable for block-statements)
In C (and C++ and Java), the semicolon is used to mark the end of a statement. It is also used the separate the expressions in a for loop.
Of course the for loop is terminated in C. All statements are terminated. Look at the syntax of the for statement... for (init-statement; test-condition; loop-statement) body-statement; That looks quite terminated to me. (By the semi-colon) Perhaps you are thinking about statement blocks... for (init-statement; test-condition; loop-statement) { statement; statement; ... statement; } ... Well, that is just fine because the body-statement, like any other statement, can be replaced by one or more statements enclosed in braces. There is still a terminating semi-colon on each statement. if i am understanding ur ques. right then according to me it is correct that for loop is not terminated because we do not execute for loop.we only check the conditions. those statements are terminated which we want to execute. because using a semicolon or terminating the statement means that statement is execitable.
anything ending in semicolon/;
If I'm reading your question right,loops and if statements with one line of code after can be terminated with a semicolon ie, if(a > b) b = a; is fine. HOWEVER, it is better coding practice to use braces to contain your code. Looks tidier and more uniform. eg, if(a > b){ b = a; } If you are talking about breaking out of a loop, try using 'break'.
True.
For clasesses it defines from which class to inherit. :: means area of visibility in certain name space.
It is the semicolon. ;
semicolon ';' (Not applicable for block-statements)
In C (and C++ and Java), the semicolon is used to mark the end of a statement. It is also used the separate the expressions in a for loop.
Of course the for loop is terminated in C. All statements are terminated. Look at the syntax of the for statement... for (init-statement; test-condition; loop-statement) body-statement; That looks quite terminated to me. (By the semi-colon) Perhaps you are thinking about statement blocks... for (init-statement; test-condition; loop-statement) { statement; statement; ... statement; } ... Well, that is just fine because the body-statement, like any other statement, can be replaced by one or more statements enclosed in braces. There is still a terminating semi-colon on each statement. if i am understanding ur ques. right then according to me it is correct that for loop is not terminated because we do not execute for loop.we only check the conditions. those statements are terminated which we want to execute. because using a semicolon or terminating the statement means that statement is execitable.
anything ending in semicolon/;
In some cases it is a separator:for (exp1; exp2; exp3) statement
Basically, because semicolons are required for terminating statements, it will hinder pretty much everything after the missing semicolon. Without it being there, the compiler will interpret your code incorrectly.
for(i=0;i<=0;i++)
Yes.