C program to get IP address

  • برمجة سي c

C program to get IP address

 

C program to print 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 this program from the folder, it may not work when you are working in a compiler and trying to run it by Ctrl + F9.

الأجوبة

#include<stdlib.h>
int main()
{
   system("C:\\Windows\\System32\\ipconfig");
   
   return 0;
}
هل كان المحتوى مفيد؟

القوائم الدراسية التي ينتمي لها السؤال

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...