0

"We can also have null statements by just including a ; or let the switch statement fall through by omitting any statements (see e.g. below).

The default case is optional and catches any other cases."


i found these lines about the switch case statement in a site.... i couldn't understand what is meant by null statement here......

the link to the page is
http://www.cs.cf.ac.uk/Dave/C/node5.html#SECTION00500000000000000000

can somebody help me please......

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Narue
0

A null statement is just a semicolon. It's a statement that does nothing. For example:

#include <stdio.h>

int main ( void )
{
  printf ( "Blah\n" ); /* Statement */

  ; /* Null statement */

  return 0;
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.