# CIS15BG - CIS 15AG 1 Test 1 Questions Chapters 1-5 Computer...

This preview shows pages 1–5. Sign up to view the full content.

CIS 15AG Test 1 Questions: Chapters 1-5 Computer Science is no more about computers than astronomy is about telescopes. - Edsgar W. Dijkstra Chapters: 1 - 5 There are 10 questions, 10 points each: 7 exercises and 3 problems. Note that while all questions carry the same weight, some will take considerably more work to solve. ______________________________________________________________________ 1. (10 Points ) You are given two files both containing machine language. The first file, let's call it FILE_1 has 161KB, and the second one, FILE_2, has 3 KB. Both files were created when working on a C program. (A) (2 Points ) Which one represents the object module? (B) (8 Points ) Why? _______________________________________________________________________ _ 2. (10 Points ) Define a float variable named amount , an int variable num , and two char variables letter1 and letter1 , then code one statement that will read the following data stream entered by the user from the keyboard into the variables described above. A B 23.18 45 // Local Declarations // Statements 1

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

View Full Document
CIS 15AG Test 1 Questions: Chapters 1-5 _______________________________________________________________________ _ 3. (10 Points ) Predict the output. int num = 725; int a = 2; int b = 3; int c; c = a + 5 * b; // Write the output below printf( "%d\n", c ); // num %= 100; printf( "%d\n", num ); // num = 725; c = num / 100 * 100; printf( "%d\n", c ); // c = a + b++; printf( "%d %d\n", b, c ); // b = 3; c = a + ++b; printf( "%d %d\n", b, c ); // a = 5; b = 7; c = !(a < b); printf( "%d\n", c ); // c = a > 0 && a < b; printf( "%d\n", c ); // c = b <= 0 || b >= a; printf( "%d\n", c ); // c = a < b || a > 0 && b != 9; printf( "%d\n", c ); // c = a < b && a > 0 || b != 9; printf( "%d %d\n", b, c ); // 2
CIS 15AG Test 1 Questions: Chapters 1-5 3

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

View Full Document
CIS 15AG Test 1 Questions: Chapters 1-5 _______________________________________________________________________ _ 4.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 12

CIS15BG - CIS 15AG 1 Test 1 Questions Chapters 1-5 Computer...

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

View Full Document
Ask a homework question - tutors are online