This is a discussion on What is the Output within the C and C++ forums, part of the Programming Talk category; What will happen when a semicolon ; is placed at the end of for statement as below: for(i = x; i &...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
nothing happens! Your code runs slower.
used it to put delay in the processing, then the processors became much faster and had to find other ways. |
|
|||
|
the above statement wont give any error but
semicolon is a null statement.semicolon gets executed till condition satisfies once the condition wont satisfy control comes out of for loop and the block of for loop gets executed(only once). if semicolon is placed where ever it is necessary it acts as a statement terminator otherwise it acts as a null statement. |
|
|||
|
no error will be displayed it will repeat until i becomes less than a.
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Control Output | caradoc | DB2 | 3 | 04-09-2007 08:59 AM |
| To achieve Output | Ralph | Linux | 0 | 12-12-2006 03:58 AM |
| C Programming - Managing Input and Output Operations | JobHelper | Career Advice | 0 | 04-15-2006 08:30 AM |
| Controlling PHP Output: Caching and compressing dynamic pages | techguru | Unix Articles and Tutorials | 0 | 08-28-2005 11:26 AM |
| [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.26) | Chet Ramey | Tech FAQ | 0 | 05-27-2004 11:00 AM |