Chapter3/example_3_2.c File Reference

Sample program that may CRASH your machine. Infinite recursion with output to see how long program can execute before it consumes available resources. More...

#include <stdio.h>

Functions

int f (int n)
 The non-terminating infinite recursion function.
int main (int argc, char **argv)
 Launch the dangerous program that may crash machine.


Detailed Description

Sample program that may CRASH your machine. Infinite recursion with output to see how long program can execute before it consumes available resources.

Author:
George Heineman
Date:
6/15/08

Function Documentation

int f ( int  n  ) 

The non-terminating infinite recursion function.

Output the result to the stdout. BE PREPARED WHEN RUNNING THIS PROGRAM THAT YOUR MACHINE MIGHT CRASH BECAUSE IT MIGHT EXHAUST ALL RESOURCES.

Parameters:
n how far we have recursed.

int main ( int  argc,
char **  argv 
)

Launch the dangerous program that may crash machine.

Algorithm Development Kit 1.0