Exit to Dos in a C program from a Switch statement

Thread Starter

sciconf

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

Thanks
 

Papabravo

Joined Feb 24, 2006
12,301
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.
 

haditya

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