• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: division by zero not an error for cc?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: division by zero not an error for cc?


  • Subject: Re: division by zero not an error for cc?
  • From: Boz Jennings <email@hidden>
  • Date: Thu, 20 Sep 2001 08:54:47 -0700

Thanks for all the feedback.

I have run this and got output, "result is 0".

Originally the code was more like...
int main(void) {
int result, value = 0;
result = 1 / value;
printf( "%s%d\n",
"result is ", result );
return 0;
}
... maybe I went to far simplifying it before posting.

Which all leads me to believe that maybe I need to look it up in the ANSI standard. Is it available online somewhere? -- This all arose from a C course I'm taking. The instructor says my machine, compiler or something is whacked. Obviously, I'd love to prove him wrong! ;+)

Peace,
boz (AKA Christofer Jennings)


  • Prev by Date: Re: How to hide a window?
  • Next by Date: Re: How to hide a window?
  • Previous by thread: Re: division by zero not an error for cc?
  • Next by thread: RE: division by zero not an error for cc?
  • Index(es):
    • Date
    • Thread