Quiz 6_ Representation_ CMPT130 D100 Introduction to Computer Programming I

.pdf

School

Douglas College *

*We aren’t endorsed by this school

Course

130

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

8

Uploaded by LieutenantSparrow1721

Report
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 1/8 Quiz 6: Representation Due Oct 30 at 11:59am Points 12 Questions 12 Available Oct 29 at 11:30am - Oct 30 at 11:59am 1 day Time Limit 30 Minutes This quiz was locked Oct 30 at 11:59am. Attempt History Attempt Time Score LATEST Attempt 1 27 minutes 6 out of 12 Score for this quiz: 6 out of 12 Submitted Oct 29 at 10:36pm This attempt took 27 minutes. 0 / 1 pts Question 1 Which type can store all the values between 1.01 and 1.02? 1. float 2. double 3. long double 2 and 3 You Answered You Answered none of them orrect Answer orrect Answer 3 1 2 all of them
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 2/8 0 / 1 pts Question 2 Which type can store a reasonable approximation of 20! (20 factorial)? 1. int 2. float 3. double 2 and 3 orrect Answer orrect Answer all of them 2 none of them 1 You Answered You Answered 3 1 / 1 pts Question 3 What data type should the result variable be declared as to best hold the result of the following C++ statement? result = "5.1" + "10,1"; string Correct! Correct! int any of these types char
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 3/8 double Note that the two operands to + are strings. 0 / 1 pts Question 4 What might be represented by the bit pattern shown below? 0000 0010 1101 1101 0010 1111 0011 1011 1. An integer 2. A floating point number 3. The colour of a pixel 2 all of them orrect Answer orrect Answer 1 and 2 none of them 1 and 3 2 and 3 3 1 You Answered You Answered 1 / 1 pts Question 5
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