answersLogoWhite

0

Program to shut down a PC in c?

Updated: 8/11/2023
User Avatar

Wiki User

14y ago

Best Answer

Well C language is a programming language it is used for designing programs. So you must be confused i can tell you how to shut your computer down using the command prompt though

*Step one open start and click run type cmd and press enter

*step two once the command prompt has opened type shutdown -i and press enter a dialogue box will appear

*Step three at the top of the box there is a button that says ADD click that and type your computers name if if you do not know your computers name opn the control panel then open system and choose the tab on the top that says computer name your computers full name will be located here

*Step four copy and paste your computers name into the box that popped up when you clicked add click ok now your computers name has been added to the list now from the drop down menu select what you want your computer to do restart shut down etc.

type a comment and select ok your computer should shutdown

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

#include <windows.h>

...

ExitWindowsEx (EWX_POWEROFF, SHTDN_REASON_FLAG_PLANNED);

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program to shut down a PC in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Dictionary meaning of shut down?

13.shut down, a. to settle over so as to envelop or darken: The fog shut down rapidly. b. to close, esp. temporarily, as a factory; cease manufacturing or business operations. c. Also, shut down on or upon. Informal. to hinder; check; stop.


After you install a new software your PC is stuck to boot what should you do?

Uninstall the software, delete the program's folder from Program Files in C:\ and then virus scan.


How can you turn a C plus plus program into a dot exe to run on a PC without a compiler?

To make C++ code into an executable program, you need a compiler. Compilation of a program doesn't have to be on the same computer as the one it's intended to be used on.


Write down a program for hotel management in c language?

ponka


Is there a 64-bit version of skyglobe?

No.


How do you generate a parse tree from an expression using C program?

c code for top down parser


What is a C Drive?

C: Drive is the main drive within your PC and the most important. It holds all of your PC's folders and information, it is set as the C: drive automatically when you first install windows. Some of the folders it contains are, Documents and Settings Program files WINDOWS


A c program to square matrix?

A C program to square matrix is a math problem. In the math problem you write down all the outer boundary values of matrix in a circle, then write down the inner value.


How do you interface external hardware through PC serial port?

Just use any of the compter language, say C,C++ make a program or rather i should say a software and then connect the hardware to the printer port and then execute the program to operate the hardware. For example make a simple program to glow an LED through the pc, you can even use a micro-processor for the same...


Should the air conditioning shut down in a new Subaru Outback when the clutch is depressed?

If you mean that the a/c shuts down or blows hot air when the a/c button is depressed then no it should not be doing that................


How can you get your tamagotchi to shut up?

Hold down the A button then press C and you can turn sound on or off! Hope this helps!


Why c program runs faster then java program?

The main reason for this is that C code compiles down to native machine code. Java bytecode needs to be run in the JVM, which may or may not compile it down to native code.