Suppose I have the following program:
int main(void)
{
int i; //Line 1
i=5; //Line 2
int *j; //line 3
j=&i; //line 4
}
If I try to print i after line 1 in Visual Studio, it gives me a compile time error saying unitialized variable i used. Does this mean that no storage was allocated to i and line 1 is only a declaration? I understand line 2 is a definition.
Also, what about line 3 and line 4? Are they declarations or definitions?