37.3k views
0 votes
Why does a variable need a data type?​

User Labs
by
4.6k points

2 Answers

5 votes
When creating a variable, we also need to declare the data type it contains. This is because the program will use different types of data in different ways.
User ShivaPrasad
by
4.6k points
1 vote
Dependent and independent variable
User Akhil S Kamath
by
4.8k points