Solution for Exercise 8-9

ex0809

#include <stdio.h>

int main()
{
    int a,b;

    a = 5;
    b = -3;

    if(a==b);
        printf("%d equals %d\n",a,b);
    return(0);
}

Notes

* The semicolon at the end of Line 10 is most likely a mistake, given the indentation of Line 11. The compiler doesn't catch this type of booboo; everything looks hunky and dorry.

* These types of errors can be insidious, not only because the compiler doesn't see them, but because they're difficult to catch.