Become Our Fan on Social Sites!

Facebook Twitter

Google+ RSS YouTube

Thursday 3 October 2013

To get IP (Internet Protocol) address using C language

IP stands for Internet Protocol, and it is unique to every computer. "ipconfig" is a command of dos. We are executing "ipconfig" command using C program. Following program outputs IP address, sub-net mask and default gateway. This program works only in Windows.
 

 #include<stdlib.h>  
 void main()  
 {  
   system("C:\\Windows\\System32\\ipconfig");  
 }  

0 comments :

Post a Comment