Situatie
To find or get the IP address in C programming, use system() function and place the command inside it to find or get the IP address.
Solutie
Pasi de urmat
/* C Program - Get IP Address */ #include<conio.h> #include<stdlib.h> void main() { clrscr(); system("C:\\Windows\\System32\\ipconfig"); getch(); }
When the above c program is compile and executed, it will produce the following result:
You can also check it out from SOURCE folder instead of BIN folder (inside SOURCE folder, you can find your program name, click on that to watch the output that will be about your ip address, sample of the output is listed below). This is for “Turbo C” users. Above C Programming Example Output (lower part of output):
Above C Programming Example Output (upper part of output):
Above C Programming Example Output (full part of output):
Leave A Comment?