Home / Computer / Shutdown Restart and get Ip adrres through your code!!!!!!!

Shutdown Restart and get Ip adrres through your code!!!!!!!

Simplify your work by code.It’s sometimes funny to work with these code .It can shutdown and restart your pc .While you are working with your pc you can operate your pc in several ways lets try some thing new.
you can shut down your pc by a simple c / java code… they just work as comment line as you use cmd or terminal ..Every code call system calls and do the rest
Code for shutdown pc-
#include <stdio.h>
#include <stdlib.h>

int main()
{
char ch;

printf(“Do you want to shutdown your computer now (y/n)\n”);
scanf(“%c”, &ch);

if (ch == ‘y’ || ch == ‘Y’)
system(“C:\\WINDOWS\\System32\\shutdown -s”);

return 0;
}

Capture

2015-11-04_9-26-10
#include <stdio.h>
#include <stdlib.h>

int main()
{
system(“C:\\WINDOWS\\System32\\shutdown /s”);

return 0;
}

shut down code for linux-
#include <stdio.h>

int main() {
system(“shutdown -P now”);
return 0;
}
java code

public static void main(String arg[]) throws IOException{
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec(“shutdown -s -t 0”);
System.exit(0);
}

code for restart pc-

#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int main()
{
char st;
clrscr();
printf(“Are you sure to restart your computer?.Please mention it(y/n):”);
scanf(“%c”,&st);

if(ch==’y’ || ch==’Y’)
{
system(“c:\\windows\\system32\\shutdown /r”);
system(“pause”);
}
return(0);
}

Code for getting ip addres-
#include<stdlib.h>
ip adress:
int main()
{
system(“C:\\Windows\\System32\\ipconfig”);

return 0;
}
now you can make an exe file from the code and share to your friends and you can enjoy your beuatiful live with codes…

stay safe and stay with it segment.net

About mehedi hasan

Check Also

Do you want to stop auto update apps from google play!!

Hence it’s good to update all the apps running on your smart phone automatically but ...

Leave a Reply

Your email address will not be published. Required fields are marked *


*

Powered by themekiller.com anime4online.com animextoon.com apk4phone.com