C Programs to shut down the system

There are various ways you can shut down the system, Today in this topic iam going to explain how to shut down the system using C Programs....

#include<stdio.h>
#include<stdlib.h>
 
main()
{
   char ch;
 
   printf("Do you want to shutdown your computer now (y/n)\n");
   scanf("%c",&ch);
 
   if( ch == 'y' || ch == 'Y' )
      system("C:\\WINDOWS\\System32\\shutdown /s");
 
   return 0;
}

#include<stdio.h>
#include<conio.h>
#include<process.h>
void main()
{
system(“shutdown -s -t 30″);
getch();
}

 

0 comments:

Post a Comment