How to Shutdown and Restart You Laptop or PC with C Program

  1. #include <stdio.h>    
  2. #include <stdlib.h>    
  3.      
  4. int main()    
  5. {    
  6.    system("C:\\WINDOWS\\System32\\shutdown /s");      // within minute your system will be shutdown after run program  
  7.      
  8.    return 0;    
  9. }