Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Basic C programming

  1. #11
    Join Date
    Mar 2007
    Location
    Coventry, UK
    Beans
    200
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Basic C programming

    Yeah, generally in C(++) you need to be very careful in checking that any inputs you get are what you expect them to be or else very strange things can happen (like being put into an infinite loop, as it once happened to me when I was a little more naive in C++!).

  2. #12
    Join Date
    Aug 2007
    Beans
    949

    Re: Basic C programming

    When you divide by zero using floating point numbers, you will get the value +/- Infinity (a constant in float.h I think) and a divide-by-zero floating point exception.

    Compare: divide by zero with an integer and your computer explodes.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •