Thread: Function or code to Determining class of IP address

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1

    Function or code to Determining class of IP address

    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

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Determining the Size of Class Objects tutorial question
    By Programmer_P in forum C++ Programming
    Replies: 2
    Last Post: 03-15-2011, 08:11 PM
  2. Specify address for a function in Relocatable Code
    By raghu2383 in forum Linux Programming
    Replies: 13
    Last Post: 07-14-2008, 04:35 PM
  3. Determining required flops to run C code
    By mollyann in forum C Programming
    Replies: 5
    Last Post: 03-30-2005, 01:28 PM
  4. Determining a user-defined class type
    By Mingzhi in forum C++ Programming
    Replies: 4
    Last Post: 07-20-2004, 05:33 PM
  5. Address of a non-static class member function?
    By darksaidin in forum C++ Programming
    Replies: 8
    Last Post: 08-25-2003, 01:25 PM