Write c program which shutdown the window operating system?

Write c program which shutdown the window operating system

#include<stdio.h>
#include<dos.h>

int main (void){
    system("shutdown -s");
    return 0;
}

Save the above c code by any name. Let's assume file name is close.c and compiled the above program. Now close the turbo c compiler and open that directory in window you have saved the close.c (default directory is c:\tc\bin) and double click on its exe file (close.exe).After some time your window operating system will shutdown.

Note: This code has written for turbo c 3.0
Post a Comment