no Hello World!!



I wrote a program using the Fedora Core 6 linux enviroment as follows:

#include <stdio.h>

int main()
{
double number;
printf("\nHello World");
return 0;
}

I compile this with "gcc -lm hello_world.c"

On running it on my debian woody system my program crashes with the
message "Floating Point Exception"

(gdb) run
Starting program: ~/hello_world.c
(no debugging symbols found)

Program received signal SIGFPE, Arithmetic exception.
0xb7fad5d1 in ?? ()
(gdb) bt
#0 0xb7fad5d1 in ?? ()
#1 0x00000000 in ?? ()
#2 0x00000000 in ?? ()
...............................
...............................
...............................

When I compile the program in my Red Hat 9.0 box it runs just fine.

I am stumped!!

Can anyone offer me some guidance as to how I can resolve this
problem??

Thanks

RWit

.



Relevant Pages