C program to find class of an IP Address
Each computer which is connected to the network has an identifier to recognise connected computer address, known as IP (Internet Protocol) Address.
An IPv4 has 4 octets having decimal value between 0 to 255 and depending on the first octet’s value, IP Addresses divided into 5 classes: (Read more: IP Address and Its classes)
Class A 1 to 126
Class B 128 to 191
Class C 192 to 223
Class D 224 to 239
Class E 240 to 254
In this program, we will read an IP Address and find its class.