Question: Write a function in c++ to check a string parameter that contains an IP address return the string with information about whether the address is

Write a function in c++ to check a string parameter that contains an IP address return the string with information about whether the address

is correct or not. Here are some possible return strings:

Correct IP;

Too many characters in a part;

Too many parts;

Only digits and dots allowed;

Too big a value of a part;

Incorrect parts count.

Example input

1.2.3.4

255.255.255.255

355.255.255.255

1000.255.255.255

ASD.255.255.255

Example output

Correct IP

Correct IP

Too big a value of a part

Too many characters in a part

Only digits and dots allowed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!