COMMON PROGRAMMING ERRORS - CONTROL STRUCTURES

COMMON PROGRAMMING ERRORS - CONTROL STRUCTURES
  1. Inserting semicolons at the end of expression in for loop or while loop or if or switch. 
For example:
for ( a = 4; a <= 10; a++);
{
   printf ( "%d", a );
}

    2.   Not inserting semicolon at the end of expression of while in do-while loop.
    3.   Not including curly braces to include if or loop statements.
    4.   Using an assignment operator in if expression instead of equality operator.

Share this

Related Posts

Previous
Next Post »