Computer Science, asked by sachinkhanduri549, 3 months ago

what will the data type of the following variable? A=101​

Answers

Answered by Tulsi4890
1

The data type of the given variable A=101 is an integer (int) data type.

  • Almost all statically typed programming languages have the following common data types:
  1. String: To store a collection of letters symbols or special characters, this is the most wider categorization and any letter or any sentence can be stored as a string
  2. Integer: This is used to store numbers without decimal values. These do have a range up to 2,147,483,647 in both negative as well as positive sides.
  3. Boolean: This data type is used to store boolean i.e. true or false values.
  • Clearly, the best fit for A=101 will be Integer (int) data type
Answered by SaurabhJacob
1

A = 101 is of integer data type.

Since the value provided to the identifier is not quoted("). So it will be considered as an integer only.

Many of the programming languages do not allow the direct initialization as given in the question. It will require the pre-declaration of the variable with the data type specified before that.

But in this case, the value assigned is integer only.

Similar questions