
Unit 2 Final Quizz

Quiz
•
Computers
•
University
•
Hard
Shubham Khari
Used 7+ times
FREE Resource
54 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int arr[] = {1, 2, 3, 4, 5}; printf("%d", arr[2]);
1
2
3
4
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the last element in an array of size 10 in C?
9
10
11
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of an array element in C if it is not initialized?
0
Garbage value
-1
Depends on the data type
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int arr[] = {10, 20, 30, 40, 50}; printf("%d", arr[1] + arr[3]);
30
60
70
90
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare an integer array of size 5 in C?
int arr(5);
int arr[5];
arr int[5];
arr(5) int;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int arr[5] = {1, 2, 3, 4, 5}; printf("%d", arr[4]);
5
4
3
2
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly assigns a value to the second element of the array `arr` in C?
arr(2) = 5;
arr[2] = 5;
arr[1] = 5;
arr = 5;
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
C Language

Quiz
•
University
50 questions
lập trình C2

Quiz
•
University
50 questions
SAINS KOMPUTER TINGKATAN 4 BAB 1

Quiz
•
3rd Grade - University
50 questions
MCQ for Coding Carnival

Quiz
•
University
50 questions
Orientation Quiz

Quiz
•
University - Professi...
50 questions
Quiz

Quiz
•
University
53 questions
UTS Struktur Data

Quiz
•
University
51 questions
lập trình C4

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade