CSC161 2010F Imperative Problem Solving
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Instructions]
Current:
[Outline]
[EBoard]
-
[Assignment]
[Lab]
Groupings:
[EBoards]
[Assignments]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Back to Control Flow: Loops. On to Functions and Parameters.
This outline is also available in PDF.
Held: Wednesday, 29 September 2010
Summary: We continue to consider loops in C, trying not to break our understanding.
Related Pages:
Notes:
Overview:
goto
.break
and continue
break
- exit the loop now!
continue
- skip the rest of the body.
continue
can be handled by an if.
break
can be handled with a sentinel and a
continue
goto
goto
.
Goto considered harmfulwas a famous paper in CS.
Received: SD, RK, CP
Missing: BB, CB, DB, MD, MH, SH, RK, MM, TM, WM, AW
Leftover questions
void
and when to
make a function return int
?
/=
? Did we learn this and I just forgot?
j-=gap
is in the place that would be occupied by increment things, but I don't know what j-
is. Or perhaps it is -=
.
c=s[i], s[i]=s[j], s[j]=c;
c = s[i]; s[i] = s[j]; s[j] = c;"
New questions
Back to Control Flow: Loops. On to Functions and Parameters.
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Instructions]
Current:
[Outline]
[EBoard]
-
[Assignment]
[Lab]
Groupings:
[EBoards]
[Assignments]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed Dec 8 10:57:08 2010.
The source to the document was last modified on Fri Aug 13 15:41:46 2010.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC161/2010F/Outlines/outline.20.html
.