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;
}
}
c program to shut down your computer

Comments

Popular posts from this blog

c program to convert any three digit number in words

c program to remove characters in string except alphabets