Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ allow the user to enter the IP address as four 8 bit unsigned integer values (just use 4 sequential CIN statements). The program

Using C++ allow the user to enter the IP address as four 8 bit unsigned integer values (just use 4 sequential CIN statements). The program should output the IP address as all 32 bits assigned into 2 variable sized groups (host group and network group) and outputted as 2 unsigned integer values from 1 bit to 31 bits each.

Example functionality:

Enter and IP address: 192 168 1 5

Which bit would you like to see: 21

Output should be 1

(Because the binary of the IP address is 11000000101010000000000100000101

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions