Arrays and Linked Lists Quiz

Arrays and Linked Lists Quiz

University

45 Qs

quiz-placeholder

Similar activities

Data Structures Quiz

Data Structures Quiz

University

50 Qs

2025190610

2025190610

University

40 Qs

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

50 Qs

Q2 PKS II TPB 10

Q2 PKS II TPB 10

University

41 Qs

DS and DAA Mock Quiz

DS and DAA Mock Quiz

University

50 Qs

KLA Quiz Struktur Data UAS

KLA Quiz Struktur Data UAS

University

50 Qs

Quiz82-DS

Quiz82-DS

University

45 Qs

CSC 105 Data Structures and Algorithms Midterm Exam

CSC 105 Data Structures and Algorithms Midterm Exam

University

50 Qs

Arrays and Linked Lists Quiz

Arrays and Linked Lists Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Seven Castueras

FREE Resource

45 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following best defines an array?

A collection of variables of different data types stored randomly in memory

A sequential collection of elements of the same type stored in contiguous memory locations

A dynamic list of heterogeneous elements stored on the heap

A collection of key-value pairs stored in non-sequential order

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What happens when you declare an array as int arr[5] = {1, 2}; in C?

Compiler error because not all 5 values are initialized

The array contains {1, 2, 0, 0, 0}

The array contains {1, 2, garbage, garbage, garbage}

Array size automatically becomes 2

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In Java, which of the following is NOT a valid array declaration?

int[] numbers;

int numbers[];

int numbers = new int[10];

int[] numbers = new int[5];

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

(Scenario) A developer wants to create an array that stores ["apple", 10, true]. Which language allows this directly without error?

C

C++

Java

JavaScript

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

True/False (as MCQ): Python has a built-in array data type that strictly enforces homogeneity of elements.

True

False

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is an example of a two-dimensional array declaration in C?

int arr[3][4];

int arr[12];

int arr(3,4);

int arr[3,4];

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

(Scenario) Suppose an array has 100 elements. A student writes a loop to print all elements. What is the time complexity of this traversal?

O(1)

O(log n)

O(n)

O(n²)

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?