Question: The process of dropping a number’s fractional part is called __________.

Answer Choices:
rounding
diminution
reduction
truncation

Answer: truncation

 

Question: The purpose of a variable declaration statement is to tell the compiler that you plan to use a variable of a specified name to store a particular type of data in the program.

Answer Choices:
True
False

Answer: True

 

Question: Assuming a string variable named movieTitle has already been declared, which one of the following statements combines the strings “The” and “Hobbit” and then assigns the resulting string to the variable?

Answer Choices:
<font face=”Courier New”>movieTitle = “The ” + “Hobbit”</font>
<font face=”Courier New”>”The ” + “Hobbit” = movieTitle;</font>
<font face=”Courier New”>movieTitle = “The ” & “Hobbit”</font>
<font face=”Courier New”>movieTitle = “The ” + “Hobbit”</font>

Answer: <font face=”Courier New”>movieTitle = “The ” + “Hobbit”</font>

 

Question: Echo is not a useful error detection technique in computer networking because:

Answer Choices:
Errors may cancel out during the echo
It is complex to use
It is difficult to implement
It is time consuming

Answer: Errors may cancel out during the echo

 

Question: If you need to store numbers and perform mathematical operations on them, you have to use a numeric data type.

Answer Choices:
True
False

Answer: True

 

Question: A variable of the int data type can hold numbers with a fractional part, such as 2.2, 1, or -9.8.

Answer Choices:
True
False

Answer: False

 

Question: Only strings are compatible with the string data type.

Answer Choices:
True
False

Answer: False

 

Question: A programming statement can consist of keywords, operators, punctuation, and other allowable programming elements, arranged in the proper sequence to perform an operation.

Answer Choices:
True
False

Answer: True

 

Question: Each numeric format string can optionally be followed by an integer that indicates how many digits to display after the decimal point.

Answer Choices:
True
False

Answer: True

 

Question: A _______ holds only one value at a time.

Answer Choices:
method
program
data type
variable

Answer: variable