From the course: Code Clinic: C

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Solution overview

Solution overview - C Tutorial

From the course: Code Clinic: C

Start my 1-month free trial

Solution overview

- [Instructor] Because I wanted this program to run on any internet-connected device where you can compile C code, the output is pure text, nothing fancy. Type the program name at the prompt and I call it just problem2. The output shows this device's public IP address, three sites are pulled, sites that report geolocation data based on IP addresses. Their latitude and longitude values are displayed. And finally, I generate what I believe to be an accurate indication measured as a radius of kilometers. This is about as fancy as I wanna get in the C language. Plus the code is gonna run the same on a variety of devices. The solution is in the spirit of the C languages text mode tradition, so I don't need to get fancy with graphics or other stuff.

Contents