COMPUTER FUNDAMENTALS

COMPUTER SOFTWARE

PROGRAMMING LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which Data Type is used to store whole numbers?
A
String
B
Double
C
Integer
D
Boolean
Explanation: 

Detailed explanation-1: -The INTEGER data type stores whole numbers that range from-2, 147, 483, 647 to 2, 147, 483, 647 for 9 or 10 digits of precision. The number 2, 147, 483, 648 is a reserved value and cannot be used. The INTEGER value is stored as a signed binary integer and is typically used to store counts, quantities, and so on.

Detailed explanation-2: -The long data type stores integers like int, but gives a wider range of values at the cost of taking more memory. Long stores at least 32 bits, giving it a range of-2, 147, 483, 648 to 2, 147, 483, 647. Alternatively, use unsigned long for a range of 0 to 4, 294, 967, 295.

Detailed explanation-3: -Numeric Data Types The exact data types, the range of numbers that can be stored in each of them, and the storage space required are specified below. Data types “bigint, ‘’ “int, ‘’ “smallint, ‘’ and “tinyint” can store integers, and the difference between these is their range and the amount of storage space required.

Detailed explanation-4: -Integer variables can only hold whole numbers.

There is 1 question to complete.