Lab8_Quiz

Lab8_Quiz

University

10 Qs

quiz-placeholder

Similar activities

Review C programming Quiz 1

Review C programming Quiz 1

University

10 Qs

C - Pointers

C - Pointers

University

10 Qs

NumpyPandas

NumpyPandas

University

10 Qs

Weekly Contest #3 - TechXNinjas

Weekly Contest #3 - TechXNinjas

University

10 Qs

ITC303 QUIZ #3

ITC303 QUIZ #3

University

10 Qs

training ep.2

training ep.2

University

11 Qs

Array

Array

University

10 Qs

J277 - 2.2 - Use of Arrays up to 2D

J277 - 2.2 - Use of Arrays up to 2D

10th Grade - University

8 Qs

Lab8_Quiz

Lab8_Quiz

Assessment

Quiz

Computers

University

Hard

Created by

bme programming

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a one-dimensional array in C#?

int array[];

int[] array;

array int[];

int array();

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

4

6

5

0

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

0

1

-1

Depends on the array

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of an integer array element in C#?

1

0

null

Empty

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to create an array in C#?

array

new

create

declare

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output?

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

Console.WriteLine(arr[2]);

5

10

15

20

7.

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);

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?