+ 1
Why do we write 'float salary' instead of 'float'
2 Respuestas
+ 8
Thisari Kanchana float is only data type for using any variable like salary you need to attach that data type with variables name like
float salary;
Please revise the lesson again.
+ 2
"float" is the data type, while "salary" is the name of the variable, together they form a declaration. The same with `int x;` for example; where "int" is the data type, and "x" is the variable name.