That is incorrect, buddy. Declaration of a variable DOES set aside memory for the variable.

A class or struct variable will not be allocated memory until the object is instantiated, unless that member is static, then memory will be allocated for it.

If one declares a variable as 'extern', then that variable is not part of the current file scope, but is presumed to be declared (and exist) elsewhere. If it does not, the linker will generate an error.

Declaration of a function provides the compiler with a signature for the function (often referred to as a prototype), but does not occupy memory.