TINFO 200 Quiz 3
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
Statements in C# end with: : ; # .
;
Which of the following is the equality operator? = != =! ==
==
Every variable has a . type size value All of the above.
All of the above
"\" is known as an escape sequence. True. False.
False
A declaration may declare only one variable at a time. True. False.
False
C# is case insensitive, therefore an identifier named Pencil is the same as one named pencil. True False
False
C# is case insensitive, therefore an identifier named Pencil is the same as one named pencil. True. False.
False
It's good practice to fit as many statements as possible on a single line. True. False.
False
The "\t" escape sequence moves the screen cursor to the top of the screen. True. False.
False
Using redundant parentheses in mathematical expressions may cause errors. True. False.
False
What does IntelliSense help you do? Detect errors Simplify writing code Compile your code a and c
Simplify writing code
_________ are violations of language rules. Logic errors Syntax errors Run-time errors None of the above.
Syntax errors
Arithmetic expressions in C# must be written in straight-line form. True. False.
True
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
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
Files called assemblies are packaging units for code in C#. True. False.
True
The console window is called the command prompt. True. False.
True
Variable names correspond to locations in the computer's memory. True False
True
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!
How can you produce the following results in one line of code? Welcome to C# Programming! Console.Write("Welcome \n to \n C# \n Programming!\n"); Console.WriteLine("Welcome \n to \n C# \n Programming!"); Console.Write("Welcome \n to \n C# Programming!"); a and b
a and b
Which of the following have the capacity to display formatted data from an interpolated string? Console.Write Console.WriteLine Console.WriteFormat a and b
a and b
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
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
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