- What is a variable in C++?
A variable in C++ is a named object.
- What is the Definition of a variable?
A special kind of declaration, which defines the data type of the variable and gives it a name.
- What is Instantiation of a variable?
An instantiation happens when an object is created and assigned a memory address. Instantiations happen during runtime.
- What is the difference between an l-value and an r-value?
L-values point to a specific memory location which identifies an object
R-values don’t point to any specific memory location, but rather refer to the data value that is stored at some address in memory.
- What is an uninitialized variable and what kind of behavior can you expect from such a variable?
It is a variable that has not been given a value yet therefore it’s value is unexpected, it can be whatever value that was previously in that memory location.
- What is undefined behavior?
It is the result of executing code whose behaviour is not well defined, such as uninitialised variables, this sort of behavior always lead to unexpected results.
/* I couldn't find the info for the question number 4, 5 and 6 in the given article,
I suppose it must have been updated.*/