Monday, August 8, 2011

Chapter 2, question 8

8.  Can comments be longer than one line?

Yes.

I can use C89 style comments over more than one line, like this:

/*  This is a comment
 *  that goes
 *  over many lines. */

Or I can use multiple C99 statements like this:

fopen ("myfile.txt", "r");  // ignore result
                                         // (This could lead to errors).

No comments:

Post a Comment