c program to shut down your computer

c program to shut down your computer if you are using windows then go through the following program to shut down your computer. #include<stdio.h> #include<stdlib.h> int main(){ char y; printf("do you want to switch off your pc(y\n)"); scanf("%c",&y); if(y=='Y'||y=='y'){ system("c:\\WINDOWS\\System32\\shutdown -s" ); return 0; } }