mid-review2

mid-review2 - COMP 102 Midterm Review 1 Dont forget the...

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

View Full Document Right Arrow Icon
1 Midterm Review COMP 102
Background image of page 1

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

View Full DocumentRight Arrow Icon
Don’t forget the Exam Today!
Background image of page 2
Tips Eat a light meal before the exam NO electronic devices (including calculators, dictionaries, phones, pagers, etc.) Exam starts at 7:30 PM (- 9:30pm) But come a little early to find your seat assignment!
Background image of page 3

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

View Full DocumentRight Arrow Icon
Seating Plan Lecture Theater A: lab3a – lab3f Lecture Theater B: lab2a – lab2e Lecture Theater C: lab1a, lab1b Lecture Theater D: lab1c, lab1d, lab1e
Background image of page 4
Know INTRODUCTION TO COMPUTER SYSTEMS (Chapter 1) DATA TYPES, VARIABLES AND CONSTANTS (Chapter 2) Data types Identifiers, variables and constants Type casting
Background image of page 5

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

View Full DocumentRight Arrow Icon
Know STRUCTURE OF C++ PROGRAMS (Chapter 3) Compiler directive #include I/O operators cin & cout Assignment statements Expressions, operators and operator precedence SELECTION STRUCTURES (Chapter 5) Relational and logical operators Logical expressions If, if-else, if-else-if , and nested if statements Dangling else
Background image of page 6
Know LOOPS (Chapter 6) for loops while loops do-while loops Increment and decrement operations Nested loops PROGRAM DESIGN AND FUNCTIONS (Chapter 4) Top-down design and stepwise refinement Function prototypes and function definitions Parameter Passing: pass-by-value, pass-by- reference
Background image of page 7

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

View Full DocumentRight Arrow Icon
Watch Out For Programming style problems indentation Nested Loops [EX 1] for(a = 1; a < 10; a++){ for(a =1; a < 10; a++) cout << a; // what happens here? }
Background image of page 8
9 02 Prog Fundamentals I: Midterm Review /Slide 9 C++ Data Type A type defines a set of values and a set of operations that can be applied on those values. The set of values for each type is known as the domain for the type. C++ contains 5 standard types: v o i d i n t c h a r f l o a t b o o l S t a n d a r d D a t a T y p e s
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 2 Prog Fundamentals I: Midterm Review /Slide 10 Identifiers appear in black in Visual C++. An identifier is a name for a variable, constant, function, etc. It consists of a letter followed by any sequence of letters, digits, and underscores. Examples of valid identifiers: First_name, age, y2000, y2k Examples of invalid identifiers: 2000y Identifiers cannot have special characters in them. For example: X=Y, J-20, ~Ricky,*Michael are invalid identifiers. Identifiers are case-sensitive. For example: Hello, hello, WHOAMI, WhoAmI, whoami are unique identifiers. C++ identifiers
Background image of page 10
11 2 Prog Fundamentals I: Midterm Review /Slide 11 Constant declarations Constants are used to store values that never change during the program execution. Using constants makes programs more readable and
Background image of page 11

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

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

Page1 / 39

mid-review2 - COMP 102 Midterm Review 1 Dont forget the...

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

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