Arrays and Linked Lists Quiz

Arrays and Linked Lists Quiz

University

45 Qs

quiz-placeholder

Similar activities

Arquitectura de computadoras corte2 ITI02

Arquitectura de computadoras corte2 ITI02

University

42 Qs

MIDTERM EXAM IN WEB DEV 101

MIDTERM EXAM IN WEB DEV 101

University

40 Qs

Pre-Lab-Net. Mgmt.-Exam

Pre-Lab-Net. Mgmt.-Exam

University

40 Qs

Penilain Harian 2

Penilain Harian 2

9th Grade - University

50 Qs

Ujian IoT PTS 2024 45 Soal

Ujian IoT PTS 2024 45 Soal

11th Grade - University

45 Qs

UTS Algoritma dan Struktur Data

UTS Algoritma dan Struktur Data

University

50 Qs

Excel Cơ bản 1.5 (7)

Excel Cơ bản 1.5 (7)

KG - University

47 Qs

UJian Pemodelan Sistem

UJian Pemodelan Sistem

University

50 Qs

Arrays and Linked Lists Quiz

Arrays and Linked Lists Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Seven Castueras

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?