Numerical addresses for computers (version 4)in the internet are composed of four parts, separated by period, as xx.yy.zz.mm where xx, yy, zz, and mm are positive integers. Local computers are usually known by nicknames. Write a C program with suitable structure to process a list of computers; identify all pairs of computers in the same locality. Restrict the computer�s nick name up to 10 characters long. Your program should read up to 100 address and nicknames terminated by a sentinel address of all zeros and a sentinel nickname. Sample Data: wasabi 555.67.7.33 gree samurai none The program should display a list of messages identifying each pair computers from same locality (i.e., same first two components of the address). In the messages, the computers should be identified by their nickname. Example message: Machines wasabi and samurai are on the same local network. Follow the messages by a display of the full list of addresses and nickname. Include your program a scan_address function, print_address function, and a local_address function. Function local_address should take two address structure as input parameters and return 1 (for true) if they are in the same local address, and return 0 (for false) otherwise.

Want an answer?

No answer yet. Submit this
question to the community.