Puzzle SL15


Will the following code compile? If so, what does it write to the monitor?

#include <stdio.h>
int g( int a, int b )
{
  int g=3 ;
  printf("scope g: a=%d    b=%d   g=%d\n", a, b, g );
}

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

This program is a slight variation of the previous one. Pay attention to the identifier g.



Previous Page        Answer         Next Page         Home