The ones who are crazy enough to think they can change the world are the ones who do.
- Steve Jobs

Shutdown Your PC Using C

C Programming Can

Its bit hard for any ordinary people to believe that "one statement of c program will shutdown your PC". Yes, C programming is capable of shutdown your PC by executing following c program in any of you local C environment.

shutdown pc

C program - Shut down Ubuntu and Linux

The following code will shutdown your PC running either in Ubuntu Operating System or Linux Operation System.

c-shutdown-linux.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("shutdown -P now ");
return 0;
}
Your system will shutdown within 1 minute...

C program - Shut down windows

The following code will shutdown your PC running in windows Operation System.

c-shutdown-windows.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("C:\\WINDOWS\\System32\\shutdown /s ");
return 0;
}
Your system will shutdown within 1 minute...

Report Us

We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.

Report