Puzzle SL13


What does the following code write to the monitor?

#include <stdio.h>
int g = 777;

int glue( double g )
{
  printf("scope g: g=%lf\n", g );
}

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

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

  return 0 ;
}


Answer         Next Page         Previous Page Home