C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is the difference between declaring a variable and defining a variable?

0 votes
23 views
asked by sunny Expert (11,410 points)

1 Answer

0 votes
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.
answered by rock Expert (14,990 points)

Related questions

0 votes
1 answer 164 views
+1 vote
1 answer 59 views
0 votes
1 answer 40 views
...