difference between declaring and initializing variable
What is the difference between declaring a variable and defining a variable? Declaring a variable means describing its type to the compiler but not allocating any space for it. Defining a variable means declaring it and also allocating space to hold the variable. You can also initialize a variable at the time it is defined.
Answer Wiki. , Studying Master in computer applications. Knows c, c++, java, python, php. Definition means, u r telling ur compilers that am gonna use this function or variable in future parts of program. Initialization means, u r assigning a value to a particular variable to perform the calculation. Views Â· View Upvotes.