Today I’m gonna share a small piece of c program to shutdown computer. It won’t take more than a minute to code and compile it. Moreover a newbie C programmer who knows some basics in C program can understand this program.
You may also like Top 25+ Websites to Learn Programming Online
Below is the source code to shutdown computer using C Program
system(“shutdown -s -t 30″);
I tried this code in Dev C++ and its working for me.
Note : When you compile and run this program it will only show empty screen and system won’t shutdown. You need to open compile file (filename.exe) directly
How about you?
Did you tried this code?
Come and share your thoughts in commends below.