9781111969752_TB_ch02 - Chapter 2 Elements of High-Quality...

Info icon This preview shows pages 1–3. Sign up to view the full content.

Chapter 2: Elements of High-Quality Programs TRUE/FALSE 1. A variable can hold more than one value at any given moment in time. ANS: F PTS: 1 REF: 39 2. Because one memory location can be used repeatedly with different values, you can write program instructions once and then use them for thousands of separate calculations ANS: T PTS: 1 REF: 39 3. In many programming languages, if you declare a variable and do not initialize it, the variable contains an unknown value until it is assigned a value. ANS: T PTS: 1 REF: 40 4. Variable names can be more than one word with blanks between the words. ANS: F PTS: 1 REF: 41 5. The assignment operator has left-to-right-to-left associativity, which means that the value of the expression to the left of the assignment operator is evaluated first and that the result is assigned to the operand on the right. ANS: F PTS: 1 REF: 42 6. A string variable can hold digits such as phone numbers and zip codes. ANS: T PTS: 1 REF: 43 7. Programmers generally write programs as one long series of steps. ANS: F PTS: 1 REF: 48 8. Modularization makes it harder for multiple programmers to work on a problem. ANS: F PTS: 1 REF: 50 9. Program comments are a type of internal documentation. ANS: T PTS: 1 REF: 64 10. Most modern programming languages require that program statements be placed in specific columns. ANS: F PTS: 1 REF: 68 MULTIPLE CHOICE 1. When you write programs, you work with data in three different forms: ____. a. values; variables, or named values; and unnamed values
Image of page 1

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

b. variables; named constants; and named memory c. variables; literals, or unnamed constants; and named constants d. variations; transliterals, or unnamed constants; and named values ANS: C PTS: 1 REF: 38 2. A specific numeric value is often called a(n) ____. 3. Fractional numeric variables that contain a decimal point are known as ____ variables. 4. In most programming languages, before you can use any variable, you must include a ____ for it. 5. The process of naming program variables and assigning a type to them is called ____ variables. a. initializing c. identifying b. declaring d. proclaiming ANS: B PTS: 1 REF: 39 6. A variable’s unknown value is commonly called ____.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern