0
What means declaring?
2 Respostas
+ 2
Declaring means that all the variables must be specified or initialised before you can use them, this allows the compilers to interpret statements correctly.
+ 1
Initialization is *not* part of a declaration. Giving a variable a value is called *definition*. Oftentimes this is done in one line but not necessarily. This difference is not to be a "smarty pants" about it, it has implications for C++.
Variable declarations can be written without initialization. Using a declared but uninitialized variable leads to so-called "undefined behavior".
In some cases this needs to be kept in mind as a variable might have to be declared but not immediately defined.