1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Data Types Teasing Me

Discussion in 'C' started by usama_muneeb, May 28, 2008.

  1. usama_muneeb

    usama_muneeb Banned

    Joined:
    Mar 7, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,
    I am just a beginner in C and the most terrible chapter is understanding Data Types. The discussion is all blunder to me. One thing I don't understand, why this constant is so used in int variables:

    0xFFE0

    when an x is coming in the way, but integers are numeral values in maths. Also do tell me if its a constant or a variable name. I am bitterly confused.
     
  2. atul.sharma12

    atul.sharma12 New Member

    Joined:
    May 21, 2008
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    S/W Engg.
    Location:
    This Planet only!!!!
    Dear Muneeb,

    Numbers can be represent in many ways like:

    Decimal
    Binary
    Octal
    Hexadecimal

    The number you mentioned is in the Hexadecimal form and if the mentioned number is withing the range of the integer data type then it can be used as int.Better you clear your concepts in data representation systems this will help you a lot.
     
  3. usama_muneeb

    usama_muneeb Banned

    Joined:
    Mar 7, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    But the number you are talking about can only be tested for its range using some for loop. I have the LPE Programming in C textbook (Stephen G. Kochan) but I haven't the slightest clue on the use of this int.

    As far as I remember, hexadecimal is like this in HTML: #FF00FF. What type of hexadecimal is it?
     

Share This Page