E14 Answer


No. The identifier g is first defined as a variable with file scope. But then, few lines later, is defined as a function. Function names have file scope, and the name of this function conflicts with the name of the variable. The compiler will complain about this.


#include <stdio.h>

int g = 777;

int g( int a, int b )
{
  int g=3 ;
  printf("scope f: a=%d\tb=%d\tg=%d\n", a, b, g );
}

int main ( void )
{
  g( 1, 2 ) ;
  system("pause") ;
  return 0 ;
}