C Program for shutting down the Operating System

#include<stdio.h>
#include<stdlib.h>
int main()
{
//for linux based systems
system("sudo init 0"); //system executes a  shell command.
//for windows
       //system("shutdown -s");
return 0;


}

Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig