• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

C/C++ How to Shut Down Your Computer Through C Program 

Status
Not open for further replies.

dEEpEst

☣☣ In The Depths ☣☣
Staff member
Administrator
Super Moderator
Hacker
Specter
Crawler
Shadow
Joined
Mar 29, 2018
Messages
13,861
Solutions
4
Reputation
32
Reaction score
45,552
Points
1,813
Credits
55,350
‎7 Years of Service‎
 
56%
 How to Shut Down Your Computer Through C Program 

To shutdown your computer using C program, You'll need to call the system() function which will call the cmd.
stdlib.h contain the system() function and it is used to run any executable file. 

C Program Code - 

To see this hidden content, you must like this content.
Note - Save the file with .c extension. 
/s represents shutdown
/t represents Time means after how much time you wanna shut down your pc. If you will not define the time, By default it will shut down your pc after 30sec.

[/CODE]
 
Status
Not open for further replies.
Back
Top