COMPLETE QUESTIONS WITH CORRECT DETAILED AND VERIFIED ANSWERS-
MOSTLY TESTED QUESTIONS -RATED 100% CORRECT!!GUARANTEED PASS!!
ALREADY GRADED A+
The escape character (\) is used to insert special characters into an output string
A.) True
B.) False - (answers)A.) True
Brute force is a good approach to programming
A.) True
B.) False - (answers)B.) False
Which of these is not a property of a good algorithm?
A.) Unambiguous
B.) Complete
C.) Precise
D.) Complex - (answers)D.) Complex
What type of error is present in the underlined C# code sample below?
public static void Main(string[] args)
{
Console.WriteLine("Enter a number");
int num = Convert.ToInt32(Console.ReadLine());
,int squared = num + num; ⬅️
Console.WriteLine(num + " squared is " + squared);
}
A.) Syntax Error
B.) Runtime Error
C.) Compilation Error
D.) Logic Error - (answers)D.) Logic Error
Evaluate as an integer: 8 - 3 * + 2 (Remember PEMDAS)
A.) 18
B.) 8
C.) 4
D.) 24 - (answers)C.) 4
Evaluate as an integer: 5 % 7 + 3 * 2 + 4
A.) 7
B.) 32
C.) 12
D.) 15 - (answers)D.) 15
In the equation 2 + * 2, the division operation / is evaluated first.
A.) True
B.) False - (answers)A.) True
,In the equation 2 + * 2, the addition operation + is evaluated first.
A.) True
B.) False - (answers)B.) False
In the equation 2 + 8 /4 * 2, the multiplication operation * is evaluated first.
A.) True
B.) False - (answers)B. False
Logical operations are evaluated before comparison / relational operators.
A.) True
B.) False - (answers)B.) False
When assigning a value to a variable, the variable must be on the left of the assignment operator
(=).
A.) True
B.) False - (answers)A.) True
Literals (boolean, int, double) are values that are entered directly into the code.
A.) True
B.) False - (answers)A.) True
What is the value of the variable remainder in the following equation?
long remainder = 3 % 6;
, A.) 6
B.) 3
C.) 0
D.) 0.5 - (answers)B.) 3
What is the value of the variable divisor in the following equation?
long remainder = 3 % 6;
A.) 6
B.) 3
C.) 0
D.) 0.5 - (answers)B.) 3
What is the value of the variable divisor in the following equation?
double divisor = 3..0;
A.) 0.5
B.) 2
C.) 0
D.) 1 - (answers)A.) 0.5
Which of the following variables could hold the literal numeric value 3.141 without losing any
information?
A.) float x
B.) int y
C.) char a
D.) String w - (answers)A.) float x