Filters
Question type

Study Flashcards

In C#, the string type allows individual characters to be accessed using a(n) ____________ with the [ ].

Correct Answer

verifed

verified

Which of the following segments of code will display the first row of a two dimensional array?


A) for (int i = 0; i   Console.Write(anArray[0, i] + "\t") ;
B) for (int i = 0; i   Console.Write(anArray[0, i] + "\t") ;.
C) for (int i = 0; i   Console.Write(anArray[i, 0] + "\t") ;
D) for (int i = 0; i   Console.Write(anArray[i, 0] + "\t") ;.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

The property ____________ returns the number of dimensions of the array.

Correct Answer

verifed

verified

BinarySearch( ) is ____.


A) a method in the ArrayList class
B) an instance method
C) usable with floating point type arrays
D) a method in the string class

E) A) and D)
F) All of the above

Correct Answer

verifed

verified

One of the properties of the ArrayList class is ____.  It Gets or sets the number of elements that the ArrayList can contain.


A) Length
B) Capacity
C) Rank
D) Count

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

C# is a row major language, which means you specify the column index ____________ when you reference elements in a two-dimensional array.

Correct Answer

verifed

verified

string [ , ] name = new string [2, 3] {{"Alex", "Ben", "Cay"}, {"Jose", "Tyne", "Yin" }}; Looking above, what does name[0, 1] reference?


A) l
B) Ben
C) Alex
D) Al

E) B) and D)
F) All of the above

Correct Answer

verifed

verified

With C#, you are limited to 10 dimensions for multi-dimensional arrays.

A) True
B) False

Correct Answer

verifed

verified

The major requirement when working with arrays is the fact that all data values placed in an array must be of the ____________.

Correct Answer

verifed

verified

Like traditional arrays, indexes of ArrayList objects are ____________.

Correct Answer

verifed

verified

____________ class represents a simple last-in-first-out (LIFO) collection of objects.

Correct Answer

verifed

verified

With a two dimensional array, when the number of columns in the rows differs, a jagged array can be created.

A) True
B) False

Correct Answer

verifed

verified

Collection classes are classes that enable you to store and retrieve various groups of objects.

A) True
B) False

Correct Answer

verifed

verified

For a two-dimensional array, values are stored ____________ using a row major format.

Correct Answer

verifed

verified

side by si...

View Answer

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.

A) True
B) False

Correct Answer

verifed

verified

string sValue = "Life is about choices"; String [ ] sn = sValue.Split(' ') ; After the above segment of code is executed, where is "choices" stored?


A) sn[0]
B) sn[4]
C) sn[3]
D) sValue

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

The string method that retrieves part of a string from a string argument is ____.


A) Trim( )
B) Substring( )
C) Retrieve( )
D) IndexOf( )

E) A) and B)
F) B) and D)

Correct Answer

verifed

verified

C# uses a row major format for accessing arrays, which means that the elements are printed in rows. Every entry in the first column is printed before moving to the second column.

A) True
B) False

Correct Answer

verifed

verified

A two dimensional array is accessed much like you access cells in a spreadsheet.

A) True
B) False

Correct Answer

verifed

verified

Which method in the string class might be useful to create a table with values number aligned?


A) Align( )
B) Concat( )
C) PadLeft( )
D) Split( )

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Showing 41 - 60 of 74

Related Exams

Show Answer