Save
SEMESTER 01
PLATFORM DEV THEORY
Chapter 14: Arrays
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Soeroe
Visit profile
Cards (30)
What is an array in programming?
A continuous block of
memory
for elements
View source
Why are arrays considered a transportable datatype?
They can be passed between different
programming languages
View source
What is the typical dimensionality of arrays?
Most arrays are one dimensional
View source
How can multi-dimensional arrays be useful in game development?
They can represent
2D
tile layouts effectively
View source
What does the dimension of an array refer to?
The number of
indices
to find an element
View source
What is the significance of the array type definition?
It specifies the
element type
and uses
[]
View source
Can the length of an array change after creation?
No
, the length is
fixed
after creation
View source
How can the length of an array be retrieved?
Using the
length
field
View source
What notation is used to specify positions in an array?
Indexer
notation with []
View source
How can arrays be initialized in C#?
Using
initialization
syntax
or collection expression syntax
View source
What is the formal parameter definition for array arguments?
It cannot specify the expected
length
of the array
View source
How can the length of an array argument be found?
Using the
Length
property
View source
What does the String.Split function return?
A
one dimensional array
of strings
View source
What happens when a program starts in C#?
The
static void Main
method is called
View source
How are command arguments passed to a program?
As an
array
of
strings
View source
What is the structure of a multi-dimensional array?
It requires multiple
indices
to identify elements
View source
How is the type definition of a multi-dimensional array structured?
It uses commas to separate
index positions
View source
How is the number of elements in a two-dimensional array calculated?
By multiplying the lengths of both
dimensions
View source
What is a key difference between multi-dimensional arrays and jagged arrays?
Jagged arrays can have sub-arrays of
different lengths
View source
What is the purpose of the params keyword in C#?
To allow variable number of
arguments
in a method
View source
What does the Array class in .NET provide?
Utility methods for
array manipulation
View source
What can the Array class do with arrays?
Copy
, search,
clone
, and
resize
arrays
View source
What is the result of resizing an array in .NET?
A new array is
allocated
with copied items
View source
What is the notation for collection initializers?
Curly braces
{}
View source
What is the purpose of the spread element in collections?
To flatten a list of
lists
into a single list
View source
What are the key features of single-dimensional arrays?
Reference type
Fixed length after creation
Length can be retrieved using
Length property
Supports
foreach
iterations
Can be initialized using
different syntaxes
View source
What are the characteristics of multi-dimensional arrays?
Requires multiple
indices
for access
Defined with commas in type definition
Length is the product of dimensions
Can be iterated using
foreach
View source
What are the advantages of jagged arrays?
Allows
sub-arrays
of different lengths
Reduces
memory usage
for varying lengths
Individual items can be accessed and modified
View source
What are the utility methods provided by the Array class?
Copying arrays
Searching for elements
Cloning arrays
(
shallow copy
)
Resizing arrays
(
new allocation
)
View source
What are the differences between collection initializers and collection expressions?
Collection initializers use
curly braces
{}
Collection expressions use
square brackets
[]
Both are considered equivalent in this context
View source