Open Application in C

Open computer application in C programming by using the system() function to run any application. system() function takes one string parameter, the parameter will be the path of the application.

Program Opening Any File

Program

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
printf("Opening uTorrent file");
system("C:\\uTorrent"); //if U write like 'system("cmd.exe");' then
getch();                 //Command Prompt Opening.
}
Output
Opening uTorrent file

Program Printing IP Address

Program

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
printf("Getting IP address with details");
system("C:\\Windows\\System32\\ipconfig");
getch();
}
Output
Getting IP address with details
Windows IP Configuration


Ethernet adapter Ethernet:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter VirtualBox Host-Only Network:
.
.
.