Lab8_Quiz_section2

Lab8_Quiz_section2

University

10 Qs

quiz-placeholder

Similar activities

ROTC Make-up Quiz

ROTC Make-up Quiz

University

15 Qs

Java Programming

Java Programming

University

10 Qs

Arrays and Functions

Arrays and Functions

University

12 Qs

Java Static

Java Static

University

10 Qs

Prob. prog 2

Prob. prog 2

University

10 Qs

Array & Vector

Array & Vector

University

11 Qs

One Dimensional Array

One Dimensional Array

University

10 Qs

Tes Awal Modul 4

Tes Awal Modul 4

University

10 Qs

Lab8_Quiz_section2

Lab8_Quiz_section2

Assessment

Quiz

Computers

University

Hard

Created by

bme programming

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a one-dimensional array?

Multi-row structure

Linear collection

Key-value pairs

Random list

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does array.Length return?

Total number of elements in the array

Maximum index of array

Number of dimensions in the array

Data type of the array

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you initialize an array with values?

int[] arr = [1, 2, 3];

int arr[] = {1, 2, 3};

int[] arr =

new int[3] {1, 2, 3};

int[] arr =

new int[3] [1, 2, 3];

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the index of the second element in a single-dimensional array in C#?

0

1

2

-2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If an array is declared as int[] arr = new int[4];, what will arr.Length return?

3

4

5

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output?

int[] arr = { 5, 10, 15, 20 };

Console.WriteLine(arr[3]);

5

10

15

20

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare a two-dimensional array of integers in C#?

int arr[];

int[,] arr;

int arr[,];

int[] arr;

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?