CPRE288 Quiz 1

.pdf

School

Iowa State University *

*We aren’t endorsed by this school

Course

288

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

3

Uploaded by AdmiralPencil12563

Report
Quiz 1 Instructions An exam prep and practice quiz is included in a Quizzes (Exam Prep) grade in the course. The purpose of am exam prep quiz is to check your understanding of knowledge and concepts (resulting in feedback to both student and instructor), provide more practice with problem- solving exercises, and show you examples of types of questions that may be on an exam. Up to eight exam prep quizzes will posted during the semester. The lowest quiz score will be dropped. You are not required to complete quizzes before taking an exam. But you are strongly encouraged to complete relevant quizzes before an exam to help you prepare for the exam. A quiz is an individual assignment. You are expected to submit your own work. You can ask general questions about quiz questions and have general discussions with other students. Do not share answers to quiz questions. Please honor these expectations for academic integrity. You can do your own work and do well. You have up to 4 attempts to submit the quiz. Having multiple attempts will let you get back into the quiz if you submit by mistake, or if there is some technical problem that closes the session. It also lets you return after reviewing class materials as part of the learning process. IMPORTANT NOTE: If you submit and go back in, you are starting over with a new attempt (that's how Canvas works). So, just in case, record your answers outside of the quiz so you can re-enter them if needed. Canvas does not have a separate save option for quizzes; however, as long as you do not submit, you can return to finish a quiz (still the same attempt). NOTE: There is no actual due date, other than before prep week. The due date shown is a target date so it appears in your list of assignments before the next quiz. You should complete quizzes before each exam because they will help you prepare for and practice questions similar to what you might find on an exam. If you need additional attempts on a quiz, please email the instructor. Questions Question 1
Numbers and Variables Given the following declarations, answer 1a-1c. 1a What is the size of variable reg in bytes? Answer: 4 1b What is the value of variable data in binary? Answer: 0b101101 1c What is the range of values for variable num in hex (from the lowest integer value represented to the highest integer value)? Answer: 0x8000 to 0x7FFF Question 2 Pointers and Memory Given the following code, answer 2a - 2b. 2a After the code executes, what is the value of variable num in decimal? short num = 45; unsigned long reg = 45; char data = 45; short num; short list[] = {1,2,3,4}; short *my_ptr = list; num = *my_ptr + list[2]; 1. short num; : Declares a variable num of type short .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help