Question: Q 4 ) Accept a string from the user. The string is an IPV 4 address. Write a program to validate the address. [ 2
Q Accept a string from the user. The string is an IPV address. Write a program to validate the address.
Rules according to
Wikipedia.org
IPv uses bit addresses in dotdecimal notation, which consists of four decimal numbers, each ranging from to separated by dots.
Example :
Input:
Output:
Invalid IPV
Example :
Input:
Output:
Valid IPV
Input:
Output:
Invalid IPv
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
