| | |
switch case
Thread Solved |
"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....00000000000000
can somebody help me please......
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....00000000000000
can somebody help me please......
A null statement is just a semicolon. It's a statement that does nothing. For example:
C Syntax (Toggle Plain Text)
#include <stdio.h> int main ( void ) { printf ( "Blah\n" ); /* Statement */ ; /* Null statement */ return 0; }
I'm here to prove you wrong.
![]() |
Similar Threads
- Switch Case Options (C#)
- Help with switch/case statement navigation (PHP)
- Switch Case Statement (Java)
- error coding switch (C)
- switch/case statement (C++)
- Cannot get switch to execute (C++)
Other Threads in the C Forum
- Previous Thread: c software execution optimization
- Next Thread: how to time program execution
| Thread Tools | Search this Thread |
#include * ansi array arrays asterisks binarysearch calculate centimeter changingto char character convert copyanyfile copyimagefile cprogramme creafecopyofanytypeoffileinc createprocess() database dynamic execv feet fgets file floatingpointvalidation fork function getlogicaldrivestrin givemetehcodez grade gtkwinlinux hacking histogram ide inches include incrementoperators infiniteloop input interest intmain() iso kernel keyboard kilometer km license linked linkedlist linux looping lowest matrix meter microsoft number oddnumber open opendocumentformat openwebfoundation owf pdf pointer posix power probleminc process program programming pyramidusingturboccodes radix read recursion recv recvblocked research reversing scheduling segmentationfault send sequential single socket socketprogramming standard strchr string suggestions systemcall test threads turboc unix urboc user variable wab whythiscodecausesegmentationfault win32api windowsapi






