9781111969752_TB_ch02 - 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

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

This preview shows page 1 - 3 out of 8 pages.

Chapter 2: Elements of High-Quality Programs TRUE/FALSE 1.A variable can hold more than one value at any given moment in time. 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 PTS: 1 REF: 39 3.In many programming languages, if you declare a variable and do not initialize it, the variable containsan unknown value until it is assigned a value. PTS: 1 REF: 40 4.Variable names can be more than one word with blanks between the words. 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. PTS: 1 REF: 42 6.A string variable can hold digits such as phone numbers and zip codes. PTS: 1 REF: 43 7.Programmers generally write programs as one long series of steps. PTS: 1 REF: 48 8.Modularization makes it harder for multiple programmers to work on a problem. PTS: 1 REF: 50 9.Program comments are a type of internal documentation. PTS: 1 REF: 64 10.Most modern programming languages require that program statements be placed in specific columns. PTS: 1 REF: 68 MULTIPLE CHOICE 1.When you write programs, you work with data in three different forms: ____.
PTS: 1 REF: 38 2.A specific numeric value is often called a(n) ____. PTS: 1 REF: 38 3.Fractional numeric variables that contain a decimal point are known as ____ variables. a.partialc.integerb.stringd.floating-pointANS: D PTS: 1 REF: 38 4.In most programming languages, before you can use any variable, you must include a ____ for it. PTS: 1 REF: 39 5.The process of naming program variables and assigning a type to them is called ____ variables. PTS: 1 REF: 39 6.A variable’s unknown value is commonly called ____. PTS: 1 REF: 40

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture