White space has no effect on the understanding of code in C and C++.
That is not to say that the programmer should be unconcerned about its misuse.
The easiest method to demonstrate what the above code truly represents is to specify all of the inferred braces directly, as seen below.
The 'if then' or 'otherwise' clause only affects one line of code in the if statement with no brackets.
This is one of the reasons why people strive to insist on 'proper coding standards' to guarantee that other people can clearly grasp the programmer's flow and meaning.
while(c != cols) {
...READ MORE
Jun 27, 2022
in C++
by
Damon
• 4,960 points
•
532 views