Write a C program to check given string is valid IPv4 address or not.This program will read an IP address in String and check whether it is a valid IPv4 address or not.
According to Wikipedia, IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1
STEPS : :
Following are steps to check whether a given string is valid IPv4 address or not:
Below is the source code of the C program to check given string is valid IPv4 address or not which is successfully compiled and run on the windows system.The Output of the program is shown below.
SOURCE : :
OUTPUT : :
need an explanation for this answer? contact us directly to get an explanation for this answer