#include <stdio.h>
/* global variable declaration */
int g = 20;
int main ()
{
/* local variable declaration */
int g = 10;
printf ("value of g = %d %d\n", g,::g);
return 0;
}
When i am trying to run this program. It is throwing error main.c:11:39: error: expected expression before ':' token
printf ("value of g = %d %d\n", g,::g);
. But if it is written in C++, it works fine.