An Empty statement is a semi-colon and it does nothing. It can be appeared anywhere a statement is been expected. These can be used where the statement is not needed but just demanded. In these cases, blocks are also allowed.
Example :
while(i > 0);
while(i > 0){}
Both the two statements are same.
Example :
while(i > 0);
while(i > 0){}
Both the two statements are same.
No comments:
Post a Comment