Exit to Dos in a C program from a Switch statement

Discussion in 'Embedded Systems and Microcontrollers' started by sciconf, Oct 3, 2006.

  1. sciconf

    Thread Starter New Member

    Oct 1, 2006
    4
    0
    If I want to exit to Dos in a C program from a Switch statement, how do I do it?

    Thanks
     
  2. Papabravo

    Expert

    Feb 24, 2006
    9,898
    1,722
    Generally speaking you look for a library function called exit(), or _exit() or some variation. You could also look for library functions like doscall() or int86() which give access to a variety of OS services.

    Functions like exit() are kinda like the roach motel, they can be entered but the never return.
     
  3. haditya

    Senior Member

    Jan 19, 2004
    220
    0
    i m kinda rusty..but i thinku can try break;it exits the loop..however exit(0) will exit the program altogether
     
Loading...