W11-FlowControl2

W11-FlowControl2 - Flow of Control 2 10/17/05 1 Debugging...

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

View Full Document Right Arrow Icon
10/17/05 1 Flow of Control 2 10/17/05 2 Debugging Start Debugging Window 10/17/05 3 Debugger Window Ignore run stop step over step into variables break point program counter
Background image of page 1

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

View Full DocumentRight Arrow Icon
10/17/05 4 Two Steps Later pc fp changed 10/17/05 5 Break Points click on - 10/17/05 6 C Logic Operators • C has logic operators && (and), || (or), and ! (not). true if both a and b are true. a || b true if either a or b is true. !a is true if a is not true , false if a is not false. • Given a = 1, b = 0, c = -5; a && b has value 0 a || b has value 1 a && !b has value 1
Background image of page 2
10/17/05 7 Leap Year Revisited if ( ( ) || (year % 400 == 0) ) printf("%d is a leap year\n",year); else printf("%d is not a leap year\n",year); 10/17/05 8 The for-loop for (expr1; expr2; expr3) { /* body of the for-loop */ } initialization expression (executed only once before entering loop) test expression (evaluated at beginning of each loop) repeated expression (executed at end of each loop cycle, just
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

W11-FlowControl2 - Flow of Control 2 10/17/05 1 Debugging...

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

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