QUESTION
ALL QUESTIONS ARE C# BASED
Which of the following conditions correctly checks to make sure someone renting a car is approved only if they are a frequent renter or they are over 25 and have a credit card?
if (is_frequent_renter || driverAge > 25 && driver_has_credit_card )
if (is_frequent_renter && driverAge > 25 && driver_has_credit_card )
if (is_frequent_renter || driverAge > 25 || driver_has_credit_card )
if (is_frequent_renter && driverAge > 25 || driver_has_credit_card )
What is the value of the following expression?
2 + 6 % 3 + 7
11
9
None of the above.
Which of the following is the term for the prepackaged methods and classes that come with C# .NET?
.NET Framework
.NET Framework Class Library
.NET Intermediate Library
Common Language Runtime
Which of the following overloads the method below?
void calcIncome( );
void calcIncome( );
int calcIncome( );
int calcIncome(int arg);
All of the above.
None of the above.
Consider this array:
char [] validGrades = {'A', 'B','C', 'D', 'F'};
Which of the following correctly prints the letter C?
Console.WriteLine(validGrades [0]);
Console.WriteLine(validGrades [1]);
Console.WriteLine(validGrades [2]);
Console.WriteLine(validGrades [3]);
Console.WriteLine(validGrades [4]);
What is the result of the follow code segment?
const int COUNTER;
Console.WriteLine(COUNTER);
0 will print
It is not possible to predicate what will print.
The code will cause run time error.
The code will not compile because one or both lines will generate a compiler error.
Assume you have a properly created array of double
variables named minutes and a method name determineOT. Which of the
following is true about the statement:
determineOT (minutes);
A copy of a memory address will be passed as the argument.
A copy of a variable's value will be passed as the argument.
Which of the following sets of statements creates a multidimensional array with 3 rows, where the first row contains 1 value, the second row contains 4 items and the final row contains 2 items?
I
nt[][] items;
items = new int[3][?];
items[0] = new int[1];
items[1] = new int[4];
items[2] = new int[2];
int[][] items;
items = new int[3][];
items[0] = new int[1];
items[1] = new int[4];
items[2] = new int[2];
int[][] items;
items = new int[?][?];
items[0] = new int[1];
items[1] = new int[4];
items[2] = new int[2];
int[][] items;
items[0] = new int[1];
items[1] = new int[4];
items[2] = new int[2];
Which of the following properly creates and initializes a Video object?
Video = new Video();
Video video = new Video();
Video video = new Video;
Video = new Video;