E16 Answer


scope g: a=1    b=2
scope m: a=8    b=9

#include <stdio.h>
char a=8, b=9;

int g ( int x, int y);

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

int main ( void )
{
  g( 1, 2 ) ;
  printf("scope m: a=%d    b=%d\n", a, b );

  system("pause") ;
  return 0 ;
}

Comments: The prototype declaration of g does not interfere with the definition of of g later on in the same scope.

The identifiers x and y that are used for parameters in the prototype do not have to match the names used in the definition of the function later on. Their scope contains nothing more than their pararameter list.