+ 2
What is the difference between declaration and definition of a variable and function?
its common to differentiate lets see how many can guess right
2 Respostas
+ 6
When you declare a variable and let it be nil, this is called declaration. When you assign some value to variable it becomes definition.
+ 3
Declaration of a variable is the action to require a memory address pointer in the memory stack without assign a primitive type and value related. Definition is the action to bind that variable (memory address related) to a primitive type (e.g int) and value (e.g. 1)