Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C WITH COMMENTS Numeric (IPv4) addresses for computers on the international network Internet are composed of four parts, separated by periods, of the form:

IN C WITH COMMENTS

Numeric (IPv4) 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 webash 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. Example Message: Machines platte and green are on the same local network Follow the messages by a display of the full list of addresses and nicknames. Include in your program a scan_address() function, a print_address() function, and a local_address() function. Function local_address() should take two address structures as input parameters and return 1 (for true) if the addresses are on the same local network, and 0 (for false) otherwise. image text in transcribed

Apps Downned Lab13 Pd hype here to search pid C Chege Study C ch 95 Stad CIS Paterson the parts, by periods, Local ity Create a structure type called addresatwth ponents for the four intepers of Internet address and fifth component Sample Data 22.5 to zreen program shoul of messages dentifyinc puters from the locality -that is, splay the two ponents of the adress In the shoula be iaealilled by their ai kaanes Example Mesage Machines pl of Include in prouaa local address) should take two add input parameters and ret for true Apps Downned Lab13 Pd hype here to search pid C Chege Study C ch 95 Stad CIS Paterson the parts, by periods, Local ity Create a structure type called addresatwth ponents for the four intepers of Internet address and fifth component Sample Data 22.5 to zreen program shoul of messages dentifyinc puters from the locality -that is, splay the two ponents of the adress In the shoula be iaealilled by their ai kaanes Example Mesage Machines pl of Include in prouaa local address) should take two add input parameters and ret for true

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

Step: 3

blur-text-image

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago