DOC PREVIEW
Saddleback CS 1B - L2 - Arithmetic

This preview shows page 1 out of 2 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lab 2 Arithmetic in C 35 pts Name Class Day Time Due Date Lab 2 Arithmetic in C What value is stored into the integer variable num after each of the following expressions has been evaluated Show each step as the compiler would evaluate it ROUND EACH FLOAT TO 2 DECIMAL PLACES Assume the following declaration int num 1 num 2 0 3 0 9 55 num final value stored 2 num 12 8 6 num final value stored 3 num 1 25 5 4 0 num final value stored Write C combined operators to perform the following 4 Add 22 to n1 store the result in n1 5 Multiply n2 12 n3 and n1 store the result in n1 6 Find the remainder of n3 divided by 3 n1 store the result in n3 rev S 10 1 of 2 CS 1B Lab 2 Arithmetic in C CS 1B 7 Given the following piece of code evaluate the expressions and determine what would be stored in the following variables SHOW YOUR WORK ie Show how each value changes int main int a b c d e f 1 2 3 4 a b c d 2 4 6 8 5 6 7 8 a c d a c e c a 6 f a b c d return 0 a b c d e f 1 2 3 4 5 6 7 8 Final Values rev S 10 2 of 2


View Full Document

Saddleback CS 1B - L2 - Arithmetic

Download L2 - Arithmetic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view L2 - Arithmetic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view L2 - Arithmetic and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?