Wednesday, January 20, 2016

How to Shutdown PC / Windows Operating System Using C program

 How to Shutdown PC / Windows Operating System Using C program

Step 1: You need to write the following program in your compiler. If you have no compiler download Codeblocks from here http://www.codeblocks.org/downloads
Step 2 : Code as same as following

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

Step 3:  Save the file as shutdown.c you can use your own substituting shutdown. Then run the program.
Step 4: Now go to the directory where you save your file. Notice that there is an EXE file. open the file shutdown.exe. After some time your pc will turn off or shutdown. Try it.

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)