You can shutdown your system using a c program.
Here is the code to shut down the system in c.
If you are using turbo c then you can not do that from the compiler directly you should execute the file from folder.
Here is the code to shut down the system in c.
For window xp:
(After 30 seconds)If you are using turbo c then you can not do that from the compiler directly you should execute the file from folder.
#include <stdio.h>
#include <stdlib.h>
int main()
{
char c;
printf("Do you want to shutdown your system: (y/n)\n");
scanf("%c",&c);
if (ch == 'y' || ch == 'Y')
system("C:\\WINDOWS\\System32\\shutdown -s");
return 0;
}