How to display the IP address of local computer in windows with C

1 Answer

0 votes
#include <stdlib.h>
 
int main(void) {
    system("C:\\Windows\\System32\\ipconfig");
	
	return 0;
}
  
  
  
  
/*
run:
    
Windows IP Configuration
 
 
Ethernet adapter Ethernet:
 
   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : ab71::9821:fs10:1234:9846%1
   IPv4 Address. . . . . . . . . . . : 123.4.56.7
   Subnet Mask . . . . . . . . . . . : 121.121.121.121
   Default Gateway . . . . . . . . . : 123.4.5.6
    
*/

 



answered Jun 6, 2020 by avibootz
edited Jun 6, 2020 by avibootz

Related questions

1 answer 145 views
1 answer 225 views
225 views asked Apr 8, 2014 by avibootz
1 answer 229 views
...