106k views
1 vote
Variables can only hold integers?
1) True
2) False

User Skube
by
8.3k points

1 Answer

0 votes

Final answer:

The claim that variables can only hold integers is false; variables can store various data types including floats, strings, booleans, and complex structures like lists and objects depending on the programming language.

Step-by-step explanation:

The statement Variables can only hold integers? is False.

Variables come in various types and can hold not only integers but also other kinds of numbers like floats (decimal numbers), as well as non-numeric data such as strings (text), boolean (true or false), and more complex data types like lists, arrays, and objects, depending on the programming language being used. This flexibility allows programmers to handle a wide range of data and to process that data appropriately in different contexts within their code.

User AnilPatel
by
7.4k points