C By Discovery (4th Edition)

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

View Full Document Right Arrow Icon
1 Intermediate Programming CSE 1320 Lecture 03 Chapter 2: 2.1-2.4 Control • Decision – Conditional statements • if • if-else • Iteration – Loops • while • for Expressions and Statements • Expressions – Sequences of tokens that can be evaluated to a numerical quantity • Single number • Single identifier • Contain any operator • Statements – Sequence of tokens terminated with a semicolon recognized by the compiler. May not have values • Assignment • Select which set of statements to execute • Cause a sequence to be executed more than once Expressions • lvalue – Expression has a location in memory (e.g., variable) – Modifiable lvalue are expressions whose values can be either changed or evaluated. – Can be used on the left hand side of an assignment statement • rvalue – Can be evaluated but cannot be changed – May only be used on the right hand side of an assignment statement • Single character ‘5’ • 2*x + 5 Assignment Expression • expr1 = expr2
Background image of page 1

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

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

Page1 / 2

Lecture03 - Control Decision Intermediate Programming CSE...

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

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