
Arrays and Linked Lists Quiz

Quiz
•
Computers
•
University
•
Hard
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
Similar Resources on Wayground
44 questions
Tin học ôn

Quiz
•
10th Grade - University
45 questions
Экзамен по MatLab.

Quiz
•
University
50 questions
CSI104 - part 1

Quiz
•
University
50 questions
Data Structure CUP

Quiz
•
University
50 questions
LATIHAN SOAL

Quiz
•
10th Grade - University
40 questions
Brain Blitz (Round 2)

Quiz
•
University
48 questions
DS Final Review

Quiz
•
University
50 questions
C program MCQ contest

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University