Ch. 3 Flashcards
(20 cards)
Which of the following is in highest-to-lowest order of operator precedence?
- multiplication, division, parentheses
- addition, subtraction, division
- parentheses, multiplication, addition
- None of the above.
parentheses, multiplication, addition
A variable is:
- an instruction for the compiler
- a location in memory where a value can be stored
- a description of a value (such as a number or character)
- None of the above.
a location in memory where a value can be stored
Concatenation is the process that enables a string and another string or a value of another data type to be combined to form a new string.
True.
False.
True
The console window is called the command prompt.
True.
False.
True
Special characters can be inserted in comments that affect how the program executes.
True.
False.
False
The starting point of a C# program is the __________ method.
Main
Start
Open
None of the above.
Main
What will the variable x have at end of the following code?
int x = 10;
x = 20;
x = 30;
x = 10;
10
20
30
The sum of the values
The code will produce an error
10
A declaration may declare only one variable at a time.
True.
False.
False
Files called assemblies are packaging units for code in C#.
True.
False.
True
When a value is placed in a memory location, the previous value in that location is moved to the next available location in memory.
True.
False.
False
Where can’t you see errors?
The line where the error occurred
The Error List window
The Solution window
The Command Prompt window
The Solution Window
What do the following lines print?
Console.Write(“Welcome to “);
Console.WriteLine(“C# Programming!”);
Welcome to
C# Programming!
Welcome to C# Programming!
Welcome to
C#
Programming!
Welcome
to
C#
Programming!
Welcome to C# Programming!
Programmers insert comments in programs to document and improve the readability of their code.
True.
False.
True
Binary operators require two operands.
True.
False.
True
Namespaces group various C# features into related categories.
True.
False.
True
Which of the following is the equality operator?
=
!=
=!
==
==
_________ are violations of language rules.
Logic errors
Syntax errors
Run-time errors
None of the above.
Syntax errors
The process of reading from a memory location is nondestructive.
True.
False.
True
Which of the following represents multiplication?
*
/
%
^
*
Interpolation expressions are enclosed in square brackets ([]).
True.
False.
False