/* File: bomb.c
   Demonstrates how overrunning a local array in a function
   causes the main program to crash.
*/

#include <stdio.h>

int i = 0 ;

void foo() {
  int arr[10] ;

  for(i = 0 ; i <= 10 ; i++) {
     arr[i] = 17 + i ;
  }

  return ;
}

main() {
  int x, y , z ;

  printf("Calling function foo()...\n") ;
  foo() ;
  printf("Done with function foo()...\n") ;
  
  y = z + 19 ; 
  x = y + 23 ;
}

