Computer Science, asked by gkotur3465, 1 year ago

Which data type is used to store both integer and float value

Answers

Answered by Mehak7081
9

int: As the name suggests, an int variable is used to store an integer. float: It is used to store decimal numbers (numbers with floating point value) with single precision. double: It is used to store decimal numbers (numbers with floating point value) with double precision.

Answered by adventureisland
0

"Number" data type is used to store both integer and float values.

About "Number" Data type :

  • An integer value is stored in the int data type, which takes up two bytes of memory.
  • A float is a data type that consists of a number that is not an integer since it contains a decimal fraction.
  • Numbers are stored in database columns as numeric data types. Exact numeric types, values where accuracy and scale must be retained are examples of these data types. INTEGER, BIGINT, FLOAT, and NUMBER are the precise numeric kinds.

Similar questions