Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Review the structure type address_t described in Programming Project 5 of Chapter 10. Write a program that will create a binary file of address_t structures

Review the structure type address_t described in Programming Project 5 of Chapter 10. Write a program that will create a binary file of address_t structures by repeatedly prompting the user to enter the IP(internet protocol) address and nickname and writing the address_t structure to the binary file. Create a second program that reads each address_t structure from the binary file and displays it in a readable format on the screen.//////////Here is problem 5 but the part in bold is what needs to be solved///////////// Programming Project 5: Numeric addresses for computers on the international network Internet are composed of four parts, separated by periods, of the form: xx.yy.zz.mm where xx, yy, zz, and mm are positive integers. Locally, computers are usually known by a nickname as well. You are designing a program to process a list of Internet addresses, identifying all pairs of computers from the same locality. Create a structure type called address_t with components for the four integers of an Internet address and a fifth component in which to store an associated nickname of 10 characters. Your program should read a list of up to 100 addresses and nicknames terminated by a sentinel address of all zeros and a sentinel nickname. SAMPLE DATA: 111.22.3.44 platte 555.66.7.88 wabash 111.22.5.66 green 0.0.0.0 none The program should display a list of messages identifying each pair of computers from the same locality---that is, each pair of computers with matching values in the first two components of the address. In the messages, the computers should be identified by their nicknames.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions