{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Exam review - Exam topics-Introduction to C(strenghts...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 Exam topics -Introduction to C (strenghts, weaknesses) -variables and assignments (chapter 2, 4, 6 and lect 2 -formatted i/o (chapter 3 and lect 3) -control statements -arrays -functions -scope of variables Loops (2 basic patterns) -count controlled loop -number of iterations is det before loop starts -counts each iteration using a counter variable -stop when desired # of iterations has been performed -for loops -event controlled loop -before each iteration, check whether some event has occurred -continue until that event occurs -the event signal is in the condition, may change during iteration, boolean variable often used to flag -while loops While statement -conditino is tested before each execution of the body -using a nonzero constant as the controlling condition creates an infinite loop ex: while 91) { ... } For Loop -for (expressino1 expression1 while (expression 2) { statement expression3 } Tracing Loop execution (shoudl know how to trace a loop execution-- what the loop does, and what values are for every iterat
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
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}