+ 1
What is the difference between #define a 10 and const int a=10; ?
1 Respuesta
+ 2
a = 10; "a" variable is not sure what data its allowed to store.
int a = 10; "a" variable knows its datatype is int and as 10 is a integer it now knows how to store it.
think of a datatype as a contract that it has to abide.