Ch. 3 Flashcards

(20 cards)

1
Q

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.
A

parentheses, multiplication, addition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

a location in memory where a value can be stored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The console window is called the command prompt.
True.
False.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Special characters can be inserted in comments that affect how the program executes.
True.
False.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The starting point of a C# program is the __________ method.
Main
Start
Open
None of the above.

A

Main

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A declaration may declare only one variable at a time.
True.
False.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Files called assemblies are packaging units for code in C#.
True.
False.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where can’t you see errors?
The line where the error occurred
The Error List window
The Solution window
The Command Prompt window

A

The Solution Window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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!

A

Welcome to C# Programming!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Programmers insert comments in programs to document and improve the readability of their code.
True.
False.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Binary operators require two operands.
True.
False.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Namespaces group various C# features into related categories.
True.
False.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following is the equality operator?
=
!=
=!
==

16
Q

_________ are violations of language rules.
Logic errors
Syntax errors
Run-time errors
None of the above.

A

Syntax errors

17
Q

The process of reading from a memory location is nondestructive.
True.
False.

18
Q

Which of the following represents multiplication?
*
/
%
^

19
Q

Interpolation expressions are enclosed in square brackets ([]).
True.
False.