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 Options:

<font face=”Courier New”>movieTitle = &quotThe &quot + &quotHobbit&quot;</font>
<font face=”Courier New”>&quotThe &quot + &quotHobbit&quot = movieTitle;</font>
<font face=”Courier New”>movieTitle = &quotThe &quot &amp; &quotHobbit&quot;</font>
<font face=”Courier New”>movieTitle = &quotThe &quot + &quotHobbit&quot;</font>

Answer: <font face=”Courier New”>movieTitle = &quotThe &quot + &quotHobbit&quot;</font>

 

Question: A(n) __________ variable belongs to the method in which it is declared, and only statements inside that method can access the variable.

Answer Options:

limited
local
global
static

Answer: local

 

Question: A variable’s __________ indicates the type of data that the variable will hold.

Answer Options:

name
location in memory
data type
assignment value

Answer: data type

 

Question: When you append the letter m or n to a numeric literal it is referred to as a __________.

Answer Options:

monetary literal
decimal
double
mnemonic literal

Answer: decimal

 

Question: A(n) __________ identifies a variable in the program code.

Answer Options:

variable name
identifying bit
hash tag

Answer: variable name

 

Question: Which one of the following statements assigns the value contained in the Text property of a TextBox control named ageTextBox to the Text Property of a Label control named ageLabel?

Answer Options:

ageLabel = ageTextBox;
ageTextBox.Text = ageLabel.Text;
ageLabel.Text = ageTextBox.Text;
ageTextBox = ageLabel;

Answer: ageLabel.Text = ageTextBox.Text;

 

Question: A variable of the __________ data type can hold any string of characters, such as a person’s name, address, password, and so on.

Answer Options:

<font face=”Courier New”>double</font>
<font face=”Courier New”>int</font>
<font face=”Courier New”>string</font>
<font face=”Courier New”>decimal</font>

Answer: <font face=”Courier New”>string</font>

 

Question: Which one of the following assignment statements, for variables of the decimal data type, will cause an error?

Answer Options:

<font face=”Courier New”>decimal cost = .99m;</font>
<font face=”Courier New”>decimal retail = 100;</font>
<font face=”Courier New”>decimal wholesale = 50.0;</font>
<font face=”Courier New”>decimal fee = 0.01m;</font>

Answer: <font face=”Courier New”>decimal retail = 100;</font>

 

Question: Which one of the following assignment statements, for variables of the double data type, will cause an error?

Answer Options:

double density = 33.12;
double length = 0.05;
double num = 4;
double bonus = 33.5m;

Answer: double bonus = 33.5m;

 

Question: One way to make sure that a variable has been assigned a value is to __________ the variable with a value when you declare it.

Answer Options:

declare
instantiate
concatenate
compare

Answer: instantiate

 

Question: Which one of the following is the general format for a variable declaration statement?

Answer Options:

<font face=”Courier New”><i>VariableName DataType;</i></font>
<font face=”Courier New”><i>DataType VariableName;</i></font>
<font face=”Courier New”><i>DataName VariableType;</i></font>
<font face=”Courier New”><i>NameType VariableData;</i></font>

Answer: <font face=”Courier New”><i>DataType VariableName;</i></font>

 

Question: Which one of the following statements declares a string variable named message?

Answer Options:

message string;
string = message;
string message;
message = string;

Answer: string message;

 

Question: Fundamental types of data, such as strings, integers, and real numbers are known as __________.

Answer Options:

fundamental data types
primitive data types
natural data types
basic data types

Answer: primitive data types

 

Question: You can use a(n) __________ to explicitly convert a value from one numeric data type to another, even if the conversion might result in a loss of data.

Answer Options:

cast operator
conversion formula
data binding
explicit operator

Answer: cast operator

 

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 Options:

True
False

Answer: True

 

Question: Legally obtained information that is gathered to help a company gain an advantage over its rivals is called which of the following?

Answer Options:

competitive intelligence
prior art
industrial espionage
trade secrets

Answer: competitive intelligence

 

Question: Reverse engineering can only be applied to computer hardware, not computer software.

Answer Options:

False
True

Answer: False

 

Question: Under which act was the U.S. patent system changed from a “first-to-invent” to a “first-inventor-to-file” system?

Answer Options:

Leahy-Smith America Invents Act
Uniform Trade Secrets Act
Lanham Act
Economic Espionage Act

Answer: Leahy-Smith America Invents Act