Lecture 05 - Comments and Variables

Lecture 05 - Comments and Variables - Announc e m e nts Co...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Comments and Variables Sept. 26, 2006 Announcements • A1 due in approximately 44 hours… • Make sure you can log into your account on the web-page! A Quick Comment • A comment is something typed into your program that is ignored by the compiler. • Comments are useful (only) for humans. • C – comments are indicated by /* and */ (in that order) Comments • /* the text in here is a comment */ • /* it is also possible to have a multi-line comment */ Commenting out • You can also put your code in a comment and it will be ignored. • /* printf( “Hello!\n” ); */ • don’t do this by accident or you will be very confused… On purpose • Sometimes commenting out code is useful to do on purpose. • E.g. if you didn’t listen to the instructor about adding one line at a time and you don’t want to delete everything you have done…
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Typical example • int main( ) • /* this function does blah blah blah • */ • { • …actual code goes here… • } Why make printing so hard? • Printing may have seemed pretty tricky with the % subsitutions. Why bother? • This statement
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 5

Lecture 05 - Comments and Variables - Announc e m e nts Co...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online