Thanks for that answer.But still there is a problem
I am using an old compiler and let us forget that.
The first example gives a compilation error as "initializer element is not constant". I assume that it is because of the variant return value of printf
function. If that is the case, why is it not a compilation error in the second example? The reason behind my assumption is that, if I give
int i =10;
there is no compilation error.
I do agree that we need a valid invocation and not a global declarion. I just came across this code from our forum. I was just trying to find out the answer to this. But quite confusing.......