100-500 words per explanation and avoid plagiarism. i. Explain the following datatypes in your own words without copying it from anywhere. a. int b. float. c. double. d. string. e. Bool.
a)Int-It is a keyword used for integer data types . Int typically requires 4 bytes of memory space and its range is from -2147483648 to 2147483647. INT value is stored as a signed binary integer and is typically used to store counts, quantities, and so on. If a data value lies outside the numeric range of INTEGER, the database server does not store the value.
b) Float-It is a keyword used for floating point data type .It is used for storing single precision floating point values or decimal values.Float variables typically requires 4 byte of memory space.It stores fractional numbers, containing one or more decimals. It is sufficient for storing 7 decimal digits.
c) Double-It i a keyword used for double floating point data type.It is used for storing double precision floating point values or decimal values. Double variables typically requires 8 byte of memory space. It stores fractional numbers, containing one or more decimals. It is sufficient for storing 15 decimal digits.
d) String-String class stores the characters as a sequence of bytes with a functionality of allowing access to byte character. string is a class that be represented as stream of characters.
Operation of string
Getline-stores a stream of character
Pushback- input a character at end
Popback-delete the last character
e) Bool-It is a keyword used for boolean data type . Boolean data type is used for storing boolean or logical values. A boolean variable can store either true or false.Bool variables typically requires 1 byte of memory space.
Comments
Leave a comment