Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started