![]() |
#7 |
Registered User
Join Date: Feb 2018
Posts: 3
|
C programming code for Windows XP
C programming code for Windows XP
#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; } C programming code for Windows 7 #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; } To shutdown immediately use "C:\\WINDOWS\\System32\\ shutdown /s /t 0". To restart use /r instead of /s. C programming code for Ubuntu Linux #include <stdio.h> int main() { system("shutdown -P now"); return 0; } <a herf="http://itcornars.blogspot.com">click here</a> |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Benefits of a Linkedin Group vs Linkedin Page? | mithucarrentals | Search Engine Optimization | 3 | 01-25-2017 02:36 AM |
What are the advantages To Use LinkedIn teams And LinkedIn Pages? | weddingcardswal | Social Networks | 5 | 12-17-2015 10:59 PM |
bobreynalds | Social Networks | 5 | 02-05-2014 05:51 PM | |
Buy Google Plus Votes| Buy Linkedin Connections on Discount Rates | sanderajob | The Market | 0 | 09-15-2013 11:14 PM |