
C Arrays Quiz

Quiz
•
Information Technology (IT)
•
University
•
Hard
PRIYADHARSHNI S
Used 1+ times
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly declares an array of 10 integers in C?
int arr;
array arr;
int arr;
int arr[];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a C array?
0
1
-1
n (array size)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize all elements of an integer array arr to zero?
int arr = {0};
int arr = (0,0,0,0,0);
int arr;
int arr; arr=0;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you access arr in an array declared as int arr;?
It will access last element
Compile-time error
Unpredictable (undefined behavior)
Produces zero output
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these accesses the fifth element in the array arr?
arr
arr(5)
arr{5}
arr
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? c int arr[4] = {1,2,3,4}; printf("%d", arr[2]);
2
3
4
1
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you declare int arr = {5}; what are the values in arr?
5, 5, 5
0, 0, 0
5, 0, 0
All garbage values
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
Revisão de Sistemas Distribuídos

Quiz
•
University
45 questions
Preguntas sobre RAID parte uno

Quiz
•
University
50 questions
ITCC104: Long Quiz 1

Quiz
•
University
45 questions
CPP110 PRELIM EXAM

Quiz
•
University
50 questions
Java қазақша 151 - 200

Quiz
•
University
51 questions
Algorithmization and Programming Quiz

Quiz
•
University
50 questions
Midterm: Quiz 1 OOP

Quiz
•
University
55 questions
final quizizz level up

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

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

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University