C Program to Shutdown Windows Computer
The shutdown command in Windows is shutdown. It is executed with command-line argument or option /p for immediate shutdown.
#include<stdio.h>
void main()
{
system("shutdown /p");
}
C Program to Shutdown Linux Computer
The shutdown command in Windows is shutdown. It is executed with command-line arguments or options -h and now to force immediate shutdown.
#include<stdio.h>
void main()
{
system("shutdown -h now");
}
No comments:
Post a Comment