Given a IPv4 address string, write C/C++/JAVA code to show the class the IP address belongs to. Sample Input: 192.168.0.0 Sample Output: Class C

Given a IPv4 address string, write C/C++/JAVA code to show the class the IP address belongs to.

Sample Input: 192.168.0.0

Sample Output: Class C

From the Rupali Bank Assistant Network Engineer 2021 – Written (CTI) exam, question 38 of 46.

More from this paper