Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me with these quiz C#: QUESTION 1 double [ ] price = new double [ ]

ID: 3827971 • Letter: P

Question

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 ____.

Trim( )

Retrieve( )

IndexOf( )

Substring( )

QUESTION 13:

The method that deletes a number of characters beginning at a specified position is ____.

Replace( )

Remove( )

Delete( )

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?

sValue.Substring(14, 7);

sValue.Substring(3);

sValue.Substring(15, 7);

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 ____.

int [ , ] anArray = new int [ , ] {{100, 100, 100} {100, 100, 100}};

int [, ] anArray = {{100, 100, 100} {100, 100, 100}};

int [ ] anArray = new int [10 ] {{100, 100, 100} {100, 100, 100}};

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 ____.

an int representing the size the array was dimensioned

how much storage is consumed by the entire array

the length of an individual element of the array

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 ____.

Application.Exit( )

Application.Stop( )

Application.Quit( )

Application.Close( )

  

QUESTION 22

A good design principle to follow when developing Windows applications is ____.

register events as soon as possible

use dark foreground and medium dark backgrounds on the form

to keep data entry to a minimum

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?

ScrollBars

Lines

MultiLine

MaxLength

  

QUESTION 25

Windows forms and controls offer a wide variety of changeable properties including ____.

Font

Text

Color

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 ____.

adds a form load method heading

runs the application

creates a syntax error

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

a.

Trim( )

b.

Retrieve( )

c.

IndexOf( )

d.

Substring( )

Explanation / Answer

1. False

Because array always starts with 0. Hence, price [2]=4.7

2. True

3. B

Elements are copied as it is the best way.

4. True

5. B

An int represent the number of values stored in array.

6. True

7. d

8. b

Maximum index=99

9. True

10. a

11. True

12. Substring ()

13. Delete()

14. False

15. b

16. c

17. False

18. d

Number of values stored in array

19. True

20. True

21. Application.exit ()

22. b

23. True

24. Lines

25. All of the above

26. False

27. False

28. b

29. True

30. False

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote