I have code below C, and I expect it to throw an error, such as "multiple variable declaration", but it is not.
#include <stdio.h> int i; int i; int main() { printf("%d",i); return 0; }
Now the conclusion is 0 , but why?
And one more thing below the code gives an error, which is expected
#include <stdio.h> int main() { int i; int i; printf("%d",i); return 0; }
O / p - error stating re declaration i
source share