{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Test 1 study guide

# Test 1 study guide - X = 4 3 y X X = 0 y = 5 4 Know how if...

This preview shows page 1. Sign up to view the full content.

Test 1 study guide: This is just a guide referring to major topics covered so far. 1) Scanf and printf use. Questions will be on finding errors and showing how the statement works: a. Cout << Num Errors: Cpital C, and missing ; b. What is printed: float num = 3.435654; cout << “Result = \$“<< num; prints: Result = \$3.435654 2) Declaring variables: a. What is an identifier? b. From the list : 1_jack, Jack_1, R2d3, K#1, which are valid identifiers ? 3) Evaluate arithmetic expression: for the following values X =3, y =4, a = 2.5; For each expression refer to the initial values. a. W = X /y++ * a++ ; W = 0.0, y = 5, a = 3.5 b. W = ++X / y++ * a++ ; W = 2.5, y = 5, a = 3.5, X = 4 ; c. a += ++X * y --; X = 4, a = 18.5, y = 3 d. X = y++ % X-- ;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: X = 4 % 3 , y++, X-- X = 0, y = 5 4) Know how if and switch statements work, tracing problem. int alpha = 5, beta = 4 ; int X = 0 ; y = 6 ; switch (beta) if( X > 0) { if ( y > 5) case 3 : alpha += 3 ; cout << “ y is bigger than 5 “ ; case 4 : alpha += 4; else break ; cout << “ y is less than 5 “ ; default : alpha += 5 ; else beta++; cout << “ X is less than 0 “ ; break ; X is less than 0 } cout << beta << alpha ; 4 9 5) Write a detailed analysis/algorithm 6) Know the following definitions: a. Algorithm b. Software Engineering c. Software Life cycle (Development cycle) (Analysis, Design, Implementation,…) d. Purpose of Comments in a program e. Identifiers (variables,. .)...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern