If IP adress is input to a function it should return the class of IP address .i.e if the IP adress is a classs A, B,C,D
If IP adress is input to a function it should return the class of IP address .i.e if the IP adress is a classs A, B,C,D
Nice, and what do you want from us?
Address Classes
Look at the first byte, and see what the top 4 bits are - then you have your answer.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.