Friday, 2024-04-26, 9:20 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: 8837 | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *:
Our poll
Rate my site
Total of answers: 164
Statistics

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