Please help me with these quiz C#:
QUESTION 1
double [ ] price = new double [ ] {3, 2.2, 4.7, 6.1, 4};
With the declaration above, price[2] refers to 2.2.
True
False.
QUESTION 2
Arrays can be used as fields or instance variables in classes; and, arrays of objects can be declared.
True
False
QUESTION 3:
What happens when you assign one array to another using the assignment operator?
a. Both arrays reference the same memory locations.
b. Elements are copied to new memory locations.
c. Both arrays become value type data elements.
d. An error message is generated.
QUESTION 4:
Array elements are normally stored in contiguous, side-by-side, memory locations with the first index in all arrays being referenced by index 0.
True
False
QUESTION 5:
One of the special properties in the Array class is Length?
It returns ____.
a. an int representing the size the array was dimensioned
b. an int representing the number of values currently stored in the array
c. how much storage is consumed by the entire array
d. the length of an individual element of the array
QUESTION 6:
When you pass an array to a method, by default, a copy of each element in the array is made and passed to the method.
True
False
QUESTION 7:
If an array is to be sent to a method, which of the following is a valid heading for a method?
a. void DisplayOutput(double anArray)
b. void DisplayOutput(double [10 ] anArray)
c. void DisplayOutput(double [ ] anArray)
d. void DisplayOutput(double anArray [10])
QUESTION 8:
Given an array declared to hold 100 values, the largest index that can be used with the array is:
a. 100
b. 99
c. undetermined
d. based on what index is used when the first value is placed in the array
QUESTION 9:
Arrays are reference variables.
True
False
QUESTION 10:
There are several ways to do a compile-time initialization of arrays. All of the following are valid ways EXCEPT ____.
a. int [ ] anArray = new int [10 ] {100, 100, 100};
b. int [ ] anArray = {100, 100, 100};
c. int [ ] anArray = new int [3 ] {100, 100, 100};
d. int [ ] anArray = new int [ ] {100, 100, 100};
QUESTION 11:
A Hashtable represents a collection of key/value pairs that are organized based on the hash code of the key.
True
False
QUESTION 12:
The string method that retrieves part of a string from a string argument is ____.
a. Trim( )
b. Retrieve( )
c. IndexOf( )
d. Substring( )
QUESTION 13:
The method that deletes a number of characters beginning at a specified position is ____.
a. Replace( )
b. Remove( )
c. Delete( )
d. ReplaceAt( )
QUESTION 14:
Multi-dimensional array identifiers are normally defined using a plural noun.
True
False
QUESTION 15:
string sValue = "Life is about choices";
string [ ] sn = sValue.Split(‘ ');
Using the Substring( ) method with sValue, which of the following references the word choices?
a. sValue.Substring(14, 7);
b. sValue.Substring(3);
c. sValue.Substring(15, 7);
d. sValue.Substring("choices");
QUESTION 16:
There are several ways to do a compile-time initialization of two-dimensional arrays. All of the following are valid ways EXCEPT ____.
a. int [ , ] anArray = new int [ , ] {{100, 100, 100} {100, 100, 100}};
b. int [, ] anArray = {{100, 100, 100} {100, 100, 100}};
c. int [ ] anArray = new int [10 ] {{100, 100, 100} {100, 100, 100}};
d. int [ , ] anArray = new int [2, 3 ] {{100, 100, 100} {100, 100, 100}};
QUESTION 17:
double [ , ] price = new double [2 , 5] {{1.1, 1.2, 1.3, 1.5, 1.4}{2.1, 2.2, 2.3, 2.5, 2.4}};
Looking above, the value of price.Length is 10.
True
False
QUESTION 18:
One of the special properties in the ArrayList class is Count. It returns ____.
a. an int representing the size the array was dimensioned
b. how much storage is consumed by the entire array
c. the length of an individual element of the array
d. an int representing the number of values currently stored in the array
QUESTION 19:
For a declaration such as, int [ , ] anArray = new int [6, 5], a total of 11 memory locations can be accessed using the identifier anArray.
True
False
QUESTION 20
Normally you will want to use two integral values to reference individual elements in a two-dimensional array. If you use just one integral value, you get all of the values for that row.
True
False
QUESTION 21
The static method that stops the application and closes all of its windows is ____.
a. Application.Exit( )
b. Application.Stop( )
c. Application.Quit( )
d. Application.Close( )
QUESTION 22
A good design principle to follow when developing Windows applications is ____.
a. register events as soon as possible
b. use dark foreground and medium dark backgrounds on the form
c. to keep data entry to a minimum
d. to add all buttons before any other controls are added
QUESTION 23
Visual Studio automatically imports the System.Windows.Forms namespace for you when you create a Windows Application Project using the IDE.
True
False
QUESTION 24
Which TextBox property can be set to enable several lines of data to be entered by the user?
a. ScrollBars
b. Lines
c. MultiLine
d. MaxLength
QUESTION 25
Windows forms and controls offer a wide variety of changeable properties including ____.
a. Font
b. Text
c. Color
d. all of the above
QUESTION 26
The GUI should be different if the application is going to be displayed on a WAP (Wireless AccessProtocol)-enabled device such as a tablet or a smart phone.
True
False
QUESTION 27
The order of when labels, buttons and controls are placed on the form does not impact anything.
True
False
QUESTION 28
Double-clicking on the form when you are using the Form Designer brings up the Code Editor and also ____.
a. adds a form load method heading
b. runs the application
c. creates a syntax error
d. registers a double click event
QUESTION 29:
It is more important to spend time designing a prototype for Windows applications than console-based applications.
True
False
QUESTION 30:
When a program is placed in a process loop, the program cannot be minimized, resized, or closed like other Windows applications.
True
False