Computer Science, asked by dkmishraknp, 1 year ago

Price="125.45"-In this statement,which type of variable price is?

Answers

Answered by anindyaadhikari13
0

Answer:

  • price = "125.45" - in this statement, the variable price is of string data type.

Explanation:

  • A string is a non-primitive data type.
  • It is used to store a sequence of characters.
  • A string can be defined as an array of characters.
  • Texts enclosed within double quotes are considered as string.
  • Even though 125.45 is a number, the variable price is of string data type since the number is enclosed within double quotes.
  • Hence, the required answer is string.
Similar questions