top of page

How to get the IP Address in C

  • Writer: Jino Shaji
    Jino Shaji
  • Jan 2, 2015
  • 1 min read

Updated: Jun 9, 2020


#include
 
int main()
{
   system("C:\\Windows\\System32\\ipconfig");
 
   return 0;
}

Output of program: ( In Windows 7)

 If you are using turbo c compiler then execute program from folder, it may not work when you are working in compiler and press Ctrl+F9 to run your program.

Code is only for windows xp & 7.

ip address

Only part of output is shown in image.

 
 
 

Opmerkingen


bottom of page