Integer Constants Assignment Help

Assignment Help: >> Basic Elements of C++ Character Set - Integer Constants

Integer Constants

An integer constant refers to a sequence of digits. There are three categories of integers that are namely, decimal, octal and hexadecimal.

Decimal integers consist of a set of digits from 0 to 9. The decimal integers can be positive or negative.

Example:

1234

0

+456

-4238

Octal integers will consist of some combination of digits from 0 to 7, with a leading zero.

Example:

089

0456

0

0555

Hexadecimal integers consist of a sequence of digits 0 to 9 and alphabets from A (a) to F (f). These integers are preceded through 0x or 0X. The letters 'A' (a) to 'F ' (f) represent the integers 10 to 15.

Example:

0X3

0XBC

0x76f

The largest integer value which can be stored is machine dependent. That is 32767 on 16- bit machine and 2,147,483,647 on the 32_bit machine. It is also possible to store large integer constants on these machines through appending modifiers like as U, L, UL to the constants.

Example:

23456U(u)                  unsigned integer

987654321UL(ul)      unsigned long integer

928374L(l)                  long integer

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd