Deck 3: Introduction to C# Apps
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/41
Play
Full screen (f)
Deck 3: Introduction to C# Apps
1
Special characters can be inserted in comments that affect how the program exe
cutes.
cutes.
False
The compiler completely ignores comments;they're for human use only.
The compiler completely ignores comments;they're for human use only.
2
"\" is known as an escape sequence.
False
an escape sequence is a combination of the escape character ("\")and another character.
an escape sequence is a combination of the escape character ("\")and another character.
3
What does IntelliSense help you do
A)Detect errors
B)Simplify writing code
C)Compile your code
D)a and c
A)Detect errors
B)Simplify writing code
C)Compile your code
D)a and c
B
4
A single line comment in C# begins with:
A) */
B) #
C) //
D) \\
A) */
B) #
C) //
D) \\
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
5
Where can't you see errors
A)The line where the error occurred
B)The Error List window
C)The Solution window
A)The line where the error occurred
B)The Error List window
C)The Solution window
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
6
Which of the following have the capacity to display formatted data from an interpolated string
A)Console.Write
B)Console.WriteLine
C)Console.WriteFormat
D)a and b
A)Console.Write
B)Console.WriteLine
C)Console.WriteFormat
D)a and b
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
7
The "\t" escape sequence moves the screen cursor to the top of the screen.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
8
Syntax errors are not identified before you attempt to com
pile a C# program using Visual Studio 2012.
pile a C# program using Visual Studio 2012.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
9
How are console apps displayed
A)In a window form.
B)In the Command Prompt.
C) Console apps have no output to display.
D) It depends.
A)In a window form.
B)In the Command Prompt.
C) Console apps have no output to display.
D) It depends.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
10
_________ are violations of language rules.
A) Logic errors
B) Syntax errors
C) Run-time errors
D) None of the above.
A) Logic errors
B) Syntax errors
C) Run-time errors
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
11
Files called assemblies are packaging units for code in C#.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
12
Statements in C# end with:
A) :
B) ;
C) #
D) )
A) :
B) ;
C) #
D) )
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
13
Apps that contain only text output are referred to as
A) text apps
B) console apps
C) simple apps
D) None of the above.
A) text apps
B) console apps
C) simple apps
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
14
C# is case insensitive,therefore an identifier named Pencil is the same as one named pencil.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
15
Namespaces group various C# features into related categories.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
16
The console window is called the command prompt.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
17
The Parameter Info window indicates how many versions of the selected method are available.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
18
Programmers insert comments in programs to document and improve the read
ability of their code.
ability of their code.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
19
The starting point of a C# program is the method.
A) Main
B) Start
C) Open
D) None of the above.
A) Main
B) Start
C) Open
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
20
Only some C# programs contain class definitions.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
21
When a value is placed in a memory location,the previous value in that loca
tion is moved to the next available location in memory.
tion is moved to the next available location in memory.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following is the equality operator
A) =
B) !=
C) =!
D) ==
A) =
B) !=
C) =!
D) ==
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
23
Arithmetic expressions in C# must be written in straight-line form.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
24
An assignment statement is evaluated from left to right.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
25
The fractional part in integer division is stored in a variable declared automat
ically at run-time.
ically at run-time.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
26
Every variable has a .
A) type
B) size
C) value
D) All of the above.
A) type
B) size
C) value
D) All of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following is in highest-to-lowest order of operator precedence
A) multiplication, division, parentheses
B) addition, subtraction, division
C) parentheses, multiplication, addition
D) None of the above.
A) multiplication, division, parentheses
B) addition, subtraction, division
C) parentheses, multiplication, addition
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following represents multiplication
A) *
B) /
C) %
D) ^
A) *
B) /
C) %
D) ^
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
29
Binary operators require two operands.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
30
Interpolation expressions are enclosed in square brackets ([]).
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
31
The process of reading from a memory location is nondestructive.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
32
A variable is:
A) an instruction for the compiler
B) a location in memory where a value can be stored
C) a description of a value (such as a number or character)
D) None of the above.
A) an instruction for the compiler
B) a location in memory where a value can be stored
C) a description of a value (such as a number or character)
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
33
A directs a user to take a specific action.
A) declaration
B) error
C) prompt
D) None of the above.
A) declaration
B) error
C) prompt
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
34
The statement allows a program to make a decision based on the truth or falsity of some condition.
A) if
B) test
C) logic
D) None of the above.
A) if
B) test
C) logic
D) None of the above.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
35
Variable names correspond to locations in the computer's memory.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
36
What does the following statement display
Console.WriteLine(
$"{"Welcome to "}\n{"C# Programming!"}");
A) Welcome to C# Programming!
B) Welcome to C# Programming!
C) {"Welcome to "} {"C# Programming!"}
D) None of the above
Console.WriteLine(
$"{"Welcome to "}\n{"C# Programming!"}");
A) Welcome to C# Programming!
B) Welcome to C# Programming!
C) {"Welcome to "} {"C# Programming!"}
D) None of the above
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
37
What will the variable x have at end of the following code
Int x = 10;
X = 20;
X = 30;
X = 10;
A) 10
B) 20
C) 30
D) The sum of the values
E) The code will produce an error
Int x = 10;
X = 20;
X = 30;
X = 10;
A) 10
B) 20
C) 30
D) The sum of the values
E) The code will produce an error
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
38
It's good practice to fit as many statements as possible on a single line.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
39
Using redundant parentheses in mathematical expressions may cause errors.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
40
A declaration may declare only one variable at a time.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
41
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.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck