
Understanding 1D Arrays in C
Quiz
•
Information Technology (IT)
•
12th Grade
•
Practice Problem
•
Medium
Ayush Tiwari
Used 1+ times
FREE Resource
Enhance your content in a minute
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to declare a 1D array in C?
int[10] arr;
int arr[10];
array int arr[10];
int arr(10);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize a 1D array with specific values in C?
int arr[5] = new int[5]{1, 2, 3, 4, 5};
int arr(5) = {1, 2, 3, 4, 5};
int arr[] = {1, 2, 3, 4, 5};
int arr = {1, 2, 3, 4, 5};
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a C array?
-1
1
5
0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you access the third element of an array named 'arr'?
arr[1]
arr[2]
arr[3]
arr.get(2)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function can be used to determine the length of an array in C?
count(array)
length(array)
array.length()
sizeof(array) / sizeof(array[0])
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you iterate through all elements of a 1D array using a for loop?
for (int i = 0; i < array.length; i += 2) { /* process array[i] */ }
for (int i = 0; i < array.length - 1; i++) { /* process array[i] */ }
for (int i = 1; i <= array.length; i++) { /* process array[i] */ }
for (int i = 0; i < array.length; i++) { /* process array[i] */ }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to access an array element with an index out of bounds?
The program will run without any issues.
The array will automatically resize to accommodate the index.
The value at the last index will be returned.
An error or exception will occur.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
GRADE 4 ICT QUIZ 1 1ST SEM 2025-2026
Quiz
•
4th Grade - University
20 questions
Grade 12B Midterm Exam: ERDs, EHR, and SQL
Quiz
•
12th Grade
20 questions
Chapter 2: Social Media in Business
Quiz
•
12th Grade
20 questions
Pemahaman Berfikir Komputasional
Quiz
•
9th Grade - University
20 questions
Media and Information Literacy
Quiz
•
12th Grade
20 questions
COMPUTERIZED ACCOUNTING
Quiz
•
12th Grade
20 questions
ISC Week 11
Quiz
•
12th Grade - University
20 questions
Proses Komputasional dan Pseudocode
Quiz
•
10th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
11 questions
Solve Systems of Equations and Inequalities
Quiz
•
9th - 12th Grade
16 questions
AP Biology: Unit 2 Review (CED)
Quiz
•
9th - 12th Grade
20 questions
Winter Jokes
Quiz
•
5th - 12th Grade
