Data Types Teasing Me

usama_muneeb's Avatar, Join Date: Mar 2008
Banned
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.
0
atul.sharma12's Avatar, Join Date: May 2008
Go4Expert Member
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.
0
usama_muneeb's Avatar, Join Date: Mar 2008
Banned
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?