Review running a C language program that reports geolocation data based on the computer's public IP address. The public IP address is displayed. Latitude and longitude values pulled from three websites are displayed. Finally, an accuracy value appears, showing the location data's accuracy within a given number of kilometers.
- [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.…
Skill Level Intermediate
1. Summarize the Weather
2. Geolocation with C
3. Eight Queens with C
4. Build a Musical Instrument with C
5. Face Recognition with C
6. Web Dashboards with C
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.