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. 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.

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

   return 0;
}

IP address program executable.

 

 

This entry was posted in C,C++ Programing, Freshers, Programing, Technical Interviews Questions and tagged . Bookmark the permalink.

3 Responses to C program to get ip address

  1. shivshakti kumar says:

    you are great sir.

  2. s prabhakaran says:

    relly fantastic sir

  3. sheikmoosa says:

    nice sir

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

You might be interested in :

  1. Google Plus:How to add contacts and invite friends from any address book This feature allows you to upload your address book from...
  2. Beware of gcc compiler on linux OS : C Trick If you are using gcc compiler on linux operating...
  3. Questions on Pointers in C 1. What is meaning of following pointer declaration? int(*(*ptr1)())[2]; (A)...