#include<iostream>
using namespace std;
void prin();//statement a
main()
{
int x; //statement 1
x=34;//statement 2
return 0;
}
I wanted to know if the variable x is allocated memory in statement 1 or in statement 2. Its a long time doubt and no one really gives a clear and confident answer to this one.
Also does declaration of a function allocate memory for it?