c program to get ip address - My articles - Publisher - Information Technology
Sunday, 2016-12-04, 5:11 PM
ebooks Programming Computer Science
Welcome Guest | RSS
Site menu
Section categories
My articles [23]
Main » Articles » My articles

c program to get ip address
This c program prints ip (internet protocol) address of your computer, system function is used to execute the command ipconfig which prints ip address, subnet mask and default gateway. The code given below works for Windows xp and Windows 7. 

#include<stdlib.h>
 
int main()
{
   system("C:\\Windows\\System32\\ipconfig");
   system("pause");
 
   return 0;
}
Category: My articles | Added by: Sumrat (2012-08-10)
Views: 529 | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *:
Our poll
Rate my site
Total of answers: 152
Statistics

Total online: 1
Guests: 1
Users: 0
Login form