Q:

C program to shut down or turn off computer

0

C program to shut down or turn off computer

 

C program to shut down your computer, i.e., to turn off a computer system. System function of "stdlib.h" is used to run an executable file "shutdown.exe" which is present in C:\WINDOWS\system32 folder in Windows 7 & XP. See Windows XP and Linux programs at the bottom of this page.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h>
#include <stdlib.h>
 
int main()
{
   system("C:\\WINDOWS\\System32\\shutdown /s");
 
   return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now