Deck 8: Advanced Collections

ملء الشاشة (f)
exit full mode
سؤال
The GetLength( )method can be called to return the number of rows or columns.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The string is a reference type in C#.
سؤال
Console.WriteLine(calories.GetUpperBound(0));returns the largest value in an array.
سؤال
In C#,a two-dimensional array is usually visualized as a table divided into columns and rows where data is stored in contiguous memory locations by column.
سؤال
In C#,you may access a two-dimensional array element using the notation [ ,] or through using a double set of braces ([ ] [ ]).
سؤال
Multi-dimensional array identifiers are normally defined using a plural noun.
سؤال
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}};
With the declaration above,price[1] refers to 1.2.
سؤال
With C#,you are limited to 10 dimensions for multi-dimensional arrays.
سؤال
Collection classes are classes that enable you to store and retrieve various groups of objects.
سؤال
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.
سؤال
For a declaration such as,int [ ,] anArray = new int [6,5],a total of 11 memory locations can be accessed using the identifier anArray.
سؤال
The string class stores an immutable series of characters--meaning once you assign a string reference a value,that referenced location's value cannot be modified.
سؤال
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.
سؤال
With a two dimensional array,when the number of columns in the rows differs,a jagged array can be created.
سؤال
The Length property can be used to return the total number of elements in all dimensions.
سؤال
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}};
With the declaration above,price[0,2] refers to 2.2.
سؤال
The major requirement of dealing with multi-dimensional arrays is the fact that all data values placed in an array must be of the same base type.
سؤال
The Rank property is used with array collections to return the number of dimensions.
سؤال
The Queue class represents a Last In First Out (LIFO)collection of objects while the
Stack collection class represents a simple FIFO (First In First Out)collection.
سؤال
The foreach loop structure cannot be used to iterate through a multi-dimensional array.
سؤال
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.
سؤال
With a two-dimensional array,GetLength(0)returns the number of rows and GetLength(1)returns the number of columns in the array.
سؤال
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Using the code shown above,what is added to total during the first iteration?

A) 0
B) 88
C) 86, 66, 76, 92 and 95
D) unknown, because val is not initialized
سؤال
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
سؤال
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Which of the following is a valid example of calling a method and sending it a two-dimensional array argument?

A) DisplayArrayContents(int [ , ] anArray);
B) DisplayArrayContents(anArray);
C) DisplayArrayContents(anArray[10, 2]);
D) DisplayArrayContents(int [10, 2] anArray);
سؤال
A two dimensional array is accessed much like you access cells in a spreadsheet.
سؤال
If an array named num is dimensioned to hold 10 values in 5 rows and 2 columns,how would you store 50 in the first physical row and first physical column?

A) num[ 1, 1 ] = 50;
B) num[ 0 , 0 ] = 50;
C) num = 50 [ ] ;
D) num5 = 50;
سؤال
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Which of the following is a valid heading for a method that could accept the two-dimensional array as an argument?

A) void DisplayOutput(double [ , ] anArray)
B) void DisplayOutput(double [10 , 2 ] anArray)
C) void DisplayOutput(double anArray)
D) void DisplayOutput(double anArray [10 , 2])
سؤال
A Hashtable represents a collection of key/value pairs that are organized based on the hash code of the key.
سؤال
One of the special properties in the ArrayList class is Count.It returns ____.

A) an int representing the number of values currently stored in the array
B) an int representing the size the array was dimensioned
C) how much storage is consumed by the entire array
D) the length of an individual element of the array
سؤال
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
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
سؤال
The ArrayList class requires you to add and remove elements to/from the structure using Push( )and Pop( )methods.
سؤال
The ArrayList class can be used to create a listlike structure that can dynamically increase or decrease in length.
سؤال
C# has two types of string literals.Quoted string literals appear between double quotation marks (" ") and verbatim string literal,which start with the at symbol (@).
سؤال
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 = {{100, 100, 100} {100, 100, 100}};
B) int [ , ] anArray = new int [ , ] {{100, 100, 100} {100, 100, 100}};
C) int [ , ] anArray = new int [2, 3 ] {{100, 100, 100} {100, 100, 100}};
D) int [ ] anArray = new int [10 ] {{100, 100, 100} {100, 100, 100}};
سؤال
The ArrayList does not allow you to mix types.All elements must be of the same data type.
سؤال
The string type allows individual characters to be accessed using an index with [ ].
سؤال
Which of the following would define a two dimensional structure to store temperature during three periods of a day for seven days?

A) int [ , ] temp = new int [7, 3];
B) int [ , ] temp = new int [6, 2];
C) int temp[7] [3 ] = new temp [7] [3];
D) int temp[6] [2 ] = new temp [6] [2];
سؤال
Since the string data type is a reference type,you compare addresses as opposed to comparing contents or values when you use the equality operators with two string data items.
سؤال
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Which of the following could be a method heading for a member method that returns a two-dimensional array?

A) int [ , ] void DoSomething( )
B) void int [ , ] DoSomething( )
C) int [ , ] DoSomething( )
D) void DoSomething[ , ]
سؤال
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
The above segment of code ____.

A) creates a jagged array
B) creates a syntax error
C) creates a 2 x 3 array
D) declares a three-dimensional array
سؤال
Which of the following is an example of a collection class?

A) Array
B) Queue
C) HashTable
D) all of the above
سؤال
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("choices");
D) sValue.Substring(15, 7);
سؤال
____ are types of data structures that consist of a sequence of data records such that in each record there is an additional field that contains a reference (i.e.,a link)to the next record in the sequence.

A) Arrays
B) ArrayLists
C) Linked lists
D) Strings
سؤال
The ____ method adds an object to the end of the queue.

A) Enqueue( )
B) Dequeue( )
C) Pop( )
D) Push( )
سؤال
Console.Write("AnExample".PadLeft(20,"#")returns ____.

A) ###########AnExample
B) AnExample###########
C) AnExample
D) AnExample
سؤال
int [ ,,] anArray = new [3,2,7] allows ____ elements to be stored.

A) 42
B) 12
C) 7
D) 3
سؤال
string [ , ] name = new string [2, 3] {{"Alex", "Ben", "Cay"}, {"Jose", "Tyne", "Yin" }};
Which of the following segments of code will display the first row of a two dimensional array?

A) for (int i = 0; i < anArray.GetLength(1); i++)
Console.Write(anArray[0, i] + "\t");
B) for (int i = 0; i < anArray.GetLength(0); i++)
Console.Write(anArray[0, i] + "\t");
C) for (int i = 0; i < anArray.GetLength(0); i++)
Console.Write(anArray[i, 0] + "\t");
D) for (int i = 0; i < anArray.GetLength(1); i++)
Console.Write(anArray[i, 0] + "\t");
سؤال
Console.Write("anExample".IndexOf("a"));returns ____.

A) null
B) 4
C) 04
D) 0
سؤال
string sValue = "Life is about choices";
string [ ] sn = sValue.Split(' ');
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( )
سؤال
Which class represents a First-In-First-Out (FIFO)collection,which is useful for storing objects in the order they were received for sequential processing?

A) Queue
B) HashTable
C) Stack
D) ArrayList
سؤال
The method ____ of the ArrayList class returns an arraylist that is a subset of another arraylist.

A) GetSubList( )
B) InsertRange( )
C) SubList( )
D) GetRange( )
سؤال
string sValue = "Life is about choices";
string [ ] sn = sValue.Split(' ');
The method in the string class that returns the string in uppercase is ____.

A) StringUpper( )
B) Upper( )
C) ConvertToUpper( )
D) ToUpper( )
سؤال
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
سؤال
The method that deletes a number of characters beginning at a specified position is ____.

A) Remove( )
B) Delete( )
C) Replace( )
D) ReplaceAt( )
سؤال
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
سؤال
The string method that retrieves part of a string from a string argument is ____.

A) Trim( )
B) Substring( )
C) Retrieve( )
D) IndexOf( )
سؤال
In order to determine the position of one or more characters inside a string argument,use the ____ method of the string class.

A) Location( )
B) Position ( )
C) IndexOf( )
D) Place( )
سؤال
string [ , ] name = new string [2, 3] {{"Alex", "Ben", "Cay"}, {"Jose", "Tyne", "Yin" }};
Which of the following returns the number of columns in a two-dimensional array?

A) Rank
B) GetLength(0)
C) GetLength(1)
D) GetLength
سؤال
C# has two types of string literals.The @-quoted string literals are called ____.

A) quoted string literal
B) at string literal
C) actual string literal
D) verbatim string literal
سؤال
If you override the GetHashCode( )method,you must also override the ____________ method to guarantee that two objects considered equal have the same hash code.Both are inherited from the object class.
سؤال
C# is a row major language,which means you specify the column index ____________ when you reference elements in a two-dimensional array.
سؤال
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
The ____________ property can be used with multidimensional arrays to get the total number of elements in all dimensions.
سؤال
Strings are considered ____________ because once you give a string a value;it cannot be
modified.Methods that seem to be modifying a string are actually returning a new
string containing the modification.
سؤال
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
For a two-dimensional array,values are stored ____________ using a row major format.
سؤال
____________ class represents a simple last-in-first-out (LIFO)collection of objects.
سؤال
The ____________ method is used with the ArrayList class to push items on the list.
سؤال
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
The property ____________ returns the number of dimensions of the array.
سؤال
To declare a three-dimensional array,three integral values are used.The first number specifies the number of ____________.
سؤال
The major requirement when working with arrays is the fact that all data values placed in an array must be of the ____________.
سؤال
As with the ArrayList class,in order to instantiate objects of many of the collection classes,you need to include a using ____________.
سؤال
The ____________ are defined to compare the contents of strings instead of comparing their addresses.
سؤال
Like traditional arrays,indexes of ArrayList objects are ____________.
سؤال
C# also includes a generic ____________ class that is very similar to the ArrayList class.The primary difference between the two classes is that objects do not have to be the same type when they are pushed on an ArrayList,unlike the other class,which requires all objects to be of the same type..
سؤال
In C#,the string type allows individual characters to be accessed using a(n)____________ with the [ ].
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/75
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Advanced Collections
1
The GetLength( )method can be called to return the number of rows or columns.
True
2
The string is a reference type in C#.
True
3
Console.WriteLine(calories.GetUpperBound(0));returns the largest value in an array.
False
4
In C#,a two-dimensional array is usually visualized as a table divided into columns and rows where data is stored in contiguous memory locations by column.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
5
In C#,you may access a two-dimensional array element using the notation [ ,] or through using a double set of braces ([ ] [ ]).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
6
Multi-dimensional array identifiers are normally defined using a plural noun.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
7
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}};
With the declaration above,price[1] refers to 1.2.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
8
With C#,you are limited to 10 dimensions for multi-dimensional arrays.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
9
Collection classes are classes that enable you to store and retrieve various groups of objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
10
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
11
For a declaration such as,int [ ,] anArray = new int [6,5],a total of 11 memory locations can be accessed using the identifier anArray.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
12
The string class stores an immutable series of characters--meaning once you assign a string reference a value,that referenced location's value cannot be modified.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
13
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
14
With a two dimensional array,when the number of columns in the rows differs,a jagged array can be created.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
15
The Length property can be used to return the total number of elements in all dimensions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
16
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}};
With the declaration above,price[0,2] refers to 2.2.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
17
The major requirement of dealing with multi-dimensional arrays is the fact that all data values placed in an array must be of the same base type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
18
The Rank property is used with array collections to return the number of dimensions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
19
The Queue class represents a Last In First Out (LIFO)collection of objects while the
Stack collection class represents a simple FIFO (First In First Out)collection.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
20
The foreach loop structure cannot be used to iterate through a multi-dimensional array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
21
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
22
With a two-dimensional array,GetLength(0)returns the number of rows and GetLength(1)returns the number of columns in the array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
23
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Using the code shown above,what is added to total during the first iteration?

A) 0
B) 88
C) 86, 66, 76, 92 and 95
D) unknown, because val is not initialized
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
24
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
25
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Which of the following is a valid example of calling a method and sending it a two-dimensional array argument?

A) DisplayArrayContents(int [ , ] anArray);
B) DisplayArrayContents(anArray);
C) DisplayArrayContents(anArray[10, 2]);
D) DisplayArrayContents(int [10, 2] anArray);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
26
A two dimensional array is accessed much like you access cells in a spreadsheet.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
27
If an array named num is dimensioned to hold 10 values in 5 rows and 2 columns,how would you store 50 in the first physical row and first physical column?

A) num[ 1, 1 ] = 50;
B) num[ 0 , 0 ] = 50;
C) num = 50 [ ] ;
D) num5 = 50;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
28
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Which of the following is a valid heading for a method that could accept the two-dimensional array as an argument?

A) void DisplayOutput(double [ , ] anArray)
B) void DisplayOutput(double [10 , 2 ] anArray)
C) void DisplayOutput(double anArray)
D) void DisplayOutput(double anArray [10 , 2])
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
29
A Hashtable represents a collection of key/value pairs that are organized based on the hash code of the key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
30
One of the special properties in the ArrayList class is Count.It returns ____.

A) an int representing the number of values currently stored in the array
B) an int representing the size the array was dimensioned
C) how much storage is consumed by the entire array
D) the length of an individual element of the array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
31
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
32
The ArrayList class requires you to add and remove elements to/from the structure using Push( )and Pop( )methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
33
The ArrayList class can be used to create a listlike structure that can dynamically increase or decrease in length.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
34
C# has two types of string literals.Quoted string literals appear between double quotation marks (" ") and verbatim string literal,which start with the at symbol (@).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
35
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 = {{100, 100, 100} {100, 100, 100}};
B) int [ , ] anArray = new int [ , ] {{100, 100, 100} {100, 100, 100}};
C) int [ , ] anArray = new int [2, 3 ] {{100, 100, 100} {100, 100, 100}};
D) int [ ] anArray = new int [10 ] {{100, 100, 100} {100, 100, 100}};
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
36
The ArrayList does not allow you to mix types.All elements must be of the same data type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
37
The string type allows individual characters to be accessed using an index with [ ].
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
38
Which of the following would define a two dimensional structure to store temperature during three periods of a day for seven days?

A) int [ , ] temp = new int [7, 3];
B) int [ , ] temp = new int [6, 2];
C) int temp[7] [3 ] = new temp [7] [3];
D) int temp[6] [2 ] = new temp [6] [2];
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
39
Since the string data type is a reference type,you compare addresses as opposed to comparing contents or values when you use the equality operators with two string data items.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
40
int [ , ] score = {{88, 66, 76, 92, 95} {67, 88, 45, 99, 80}};
int total = 0;
foreach (int val in score)
total += val;
Which of the following could be a method heading for a member method that returns a two-dimensional array?

A) int [ , ] void DoSomething( )
B) void int [ , ] DoSomething( )
C) int [ , ] DoSomething( )
D) void DoSomething[ , ]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
41
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
The above segment of code ____.

A) creates a jagged array
B) creates a syntax error
C) creates a 2 x 3 array
D) declares a three-dimensional array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
42
Which of the following is an example of a collection class?

A) Array
B) Queue
C) HashTable
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
43
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("choices");
D) sValue.Substring(15, 7);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
44
____ are types of data structures that consist of a sequence of data records such that in each record there is an additional field that contains a reference (i.e.,a link)to the next record in the sequence.

A) Arrays
B) ArrayLists
C) Linked lists
D) Strings
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____ method adds an object to the end of the queue.

A) Enqueue( )
B) Dequeue( )
C) Pop( )
D) Push( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
46
Console.Write("AnExample".PadLeft(20,"#")returns ____.

A) ###########AnExample
B) AnExample###########
C) AnExample
D) AnExample
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
47
int [ ,,] anArray = new [3,2,7] allows ____ elements to be stored.

A) 42
B) 12
C) 7
D) 3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
48
string [ , ] name = new string [2, 3] {{"Alex", "Ben", "Cay"}, {"Jose", "Tyne", "Yin" }};
Which of the following segments of code will display the first row of a two dimensional array?

A) for (int i = 0; i < anArray.GetLength(1); i++)
Console.Write(anArray[0, i] + "\t");
B) for (int i = 0; i < anArray.GetLength(0); i++)
Console.Write(anArray[0, i] + "\t");
C) for (int i = 0; i < anArray.GetLength(0); i++)
Console.Write(anArray[i, 0] + "\t");
D) for (int i = 0; i < anArray.GetLength(1); i++)
Console.Write(anArray[i, 0] + "\t");
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
49
Console.Write("anExample".IndexOf("a"));returns ____.

A) null
B) 4
C) 04
D) 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
50
string sValue = "Life is about choices";
string [ ] sn = sValue.Split(' ');
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( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
51
Which class represents a First-In-First-Out (FIFO)collection,which is useful for storing objects in the order they were received for sequential processing?

A) Queue
B) HashTable
C) Stack
D) ArrayList
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
52
The method ____ of the ArrayList class returns an arraylist that is a subset of another arraylist.

A) GetSubList( )
B) InsertRange( )
C) SubList( )
D) GetRange( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
53
string sValue = "Life is about choices";
string [ ] sn = sValue.Split(' ');
The method in the string class that returns the string in uppercase is ____.

A) StringUpper( )
B) Upper( )
C) ConvertToUpper( )
D) ToUpper( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
54
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
55
The method that deletes a number of characters beginning at a specified position is ____.

A) Remove( )
B) Delete( )
C) Replace( )
D) ReplaceAt( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
56
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
57
The string method that retrieves part of a string from a string argument is ____.

A) Trim( )
B) Substring( )
C) Retrieve( )
D) IndexOf( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
58
In order to determine the position of one or more characters inside a string argument,use the ____ method of the string class.

A) Location( )
B) Position ( )
C) IndexOf( )
D) Place( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
59
string [ , ] name = new string [2, 3] {{"Alex", "Ben", "Cay"}, {"Jose", "Tyne", "Yin" }};
Which of the following returns the number of columns in a two-dimensional array?

A) Rank
B) GetLength(0)
C) GetLength(1)
D) GetLength
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
60
C# has two types of string literals.The @-quoted string literals are called ____.

A) quoted string literal
B) at string literal
C) actual string literal
D) verbatim string literal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
61
If you override the GetHashCode( )method,you must also override the ____________ method to guarantee that two objects considered equal have the same hash code.Both are inherited from the object class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
62
C# is a row major language,which means you specify the column index ____________ when you reference elements in a two-dimensional array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
63
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
The ____________ property can be used with multidimensional arrays to get the total number of elements in all dimensions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
64
Strings are considered ____________ because once you give a string a value;it cannot be
modified.Methods that seem to be modifying a string are actually returning a new
string containing the modification.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
65
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
For a two-dimensional array,values are stored ____________ using a row major format.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
66
____________ class represents a simple last-in-first-out (LIFO)collection of objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
67
The ____________ method is used with the ArrayList class to push items on the list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
68
int[ ] [ ] anArray = new int[2] [ ];
anArray[0] = new int[ ] {100, 200};
anArray[1] = new int[ ] {11, 22, 37};
The property ____________ returns the number of dimensions of the array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
69
To declare a three-dimensional array,three integral values are used.The first number specifies the number of ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
70
The major requirement when working with arrays is the fact that all data values placed in an array must be of the ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
71
As with the ArrayList class,in order to instantiate objects of many of the collection classes,you need to include a using ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
72
The ____________ are defined to compare the contents of strings instead of comparing their addresses.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
73
Like traditional arrays,indexes of ArrayList objects are ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
74
C# also includes a generic ____________ class that is very similar to the ArrayList class.The primary difference between the two classes is that objects do not have to be the same type when they are pushed on an ArrayList,unlike the other class,which requires all objects to be of the same type..
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
75
In C#,the string type allows individual characters to be accessed using a(n)____________ with the [ ].
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.