Puzzle SL27


Rule 1.2b and 2.4

What does the following write to the monitor?


/* --- fileB.c --- */
#include <stdio.h>

int x = 444 ;
void foo(int x)
{
  printf("x as parameter: %d\n", x );
  x = 25;
  printf("x as parameter: %d\n", x );
}

/* --- fileC.c --- */
#include <stdio.h>
void foo( int z);

void main()
{
  extern int x ;
  printf("x before foo: %d\n", x );
  foo( 7 );
  printf("x after  foo: %d\n", x );
}



Answer         Next Page         Previous Page Home