Re: division by zero not an error for cc?
Re: division by zero not an error for cc?
- Subject: Re: division by zero not an error for cc?
- From: Dan White <email@hidden>
- Date: Thu, 20 Sep 2001 10:04:37 -0400
At 4:37 PM -0700 9/19/01, Boz Jennings wrote:
>
Hi all,
>
>
Why does the following not give me a division by zero error?
>
>
>int main(void) {
>
> result = 1 / 0;
>
> printf( "%s%d\n",
>
> "result is ", result );
>
> return 0;
>
>}
>
>
Thanks,
>
boz
Syntactically, there is nothing wrong with your source.
It should pitch a fit when you run it.
From your question, I am assuming you compiled it and got no error. Did you try running it ?
--
------------------------------------------------------------------------
Dan White
------------------------------------------------------------------------
"Sometimes I think the surest sign that intelligent life exists
elsewhere in the universe is that none of it has tried to contact us."
Calvin (Bill Waterson)