help me writing prog


I need to write a program that parses an ip address and subnet mask and prints out the associated network id and host id.

The program should accept the ip address and subnet mask as input parameters, e.g.,

ipcalc 192.168.1.129 255.255.255.240

The output should display the class of the address, along with the network and host id, e.g.,

Class C Address
Network ID: 192.168.1.128
Host ID : 0.0.0.1

Can someone please help me solving this question.

Thanks!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories