What is right way to Initialize array?
C Language Array Quiz

Quiz
•
Computers
•
University
•
Medium
Fidel Romasanta
Used 7+ times
FREE Resource
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
int num[6] = { 2, 4, 12, 5, 45, 5 };
int n{} = { 2, 4, 12, 5, 45, 5 };
int n{6} = { 2, 4, 12 };
int n(6) = { 2, 4, 12, 5, 45, 5 };
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An array elements are always stored in ________ memory locations.
sequential
Random
Sequential and Random
None of the above
3.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What is the result of the code below?
int a[]={11,13,56,20,5};
printf("%d",a[2]);
garbage value
13
56
20
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
How to accesses the seventh element in array "myArr" with 100 elements?
myArr[6]
myArr[7]
myArr{6}
myArr{7}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An array Index starts with _____.
-1
0
1
2
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the minimum and maximum Indexes of array "int myArr[9];"
-1, 8
0, 8
1,9
None of the above
7.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What is the output of this code fragment?
int a[2][3] = { {1,1,1},{2,2,2}};
printf("%d", a[1][1]);
1
Error
2
0
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
CCE-III Programming in C Language

Quiz
•
University
20 questions
Linux 3-4

Quiz
•
University
20 questions
Programming in C(1)

Quiz
•
University
15 questions
C programming

Quiz
•
University
18 questions
Programming in C language

Quiz
•
12th Grade - University
15 questions
Milking Minds 2 17-01-24

Quiz
•
University
20 questions
Apuntadores en C

Quiz
•
University
20 questions
Pointers

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade