CSC 1100 Lecture Notes - Lecture 9: Kilobyte, Switch Statement

35 views4 pages

Document Summary

Operator precedence: if an expression contains, relational and logical operators, the order of precedence determines how the expression is evaluated, see lecture 9, might be in the midterm exam. Block: a block is a set of one or more statements, syntax. One statement, curly braces are not required. More than one statement, curly braces are required. If statement: has one or more conditions and one or more execution paths. Ends if a following else block exists, it is executed. If a following else if condition exists, then it is tested: an if statement has several variations including: Test whether or not to execute a block. Test whether to execute one block or another. If all conditions are false: then no block is executed (because the last clause is else if) If all conditions are false, then the last block is executed: because the last clause is else. There may be as many conditions as needed.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents