Users Online

· Guests Online: 150

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

45 C Program to Shutdown or Turn Off the Computer in Linux

his C Program shutdowns or turn offs the computer in linux.
Here is source code of the C Program to shutdown or turn off the computer in linux. The C program is successfully compiled and run on a Linux system. The program output is also shown below.

/*
* C Program to Shutdown or Turn Off the Computer in Linux.
*/
#include <stdio.h>

int main()
{
system("shutdown -P now");
return 0;
}

$ cc pgm57.c
$ a.out
shutdown: Need to be root

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.87 seconds
10,811,029 unique visits