
Arrays

Quiz
•
Computers
•
11th Grade
•
Medium
Ilakkiya N
Used 6+ times
FREE Resource
10 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(10);
int arr[10];
array int arr[10];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about arrays is TRUE in C?
Arrays can hold different data types.
The size of an array can be changed during execution.
An array stores elements of the same type in contiguous memory.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a C array?
0
1
-1
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to initialize all elements of an array to zero in C?
int arr[5] = (0);
int arr[5] = {0};
int arr[5] = 0;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How are arrays stored in memory?
All elements are stored in a contiguous block of memory.
Each element is stored at a random memory location.
Elements are dynamically linked to the next element in memory.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid array declaration?
int arr[10];
int arr[3] = {1, 2, 3, 4};
int arr[] = {1, 2, 3};
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
#include <stdio.h>
int main()
{
int arr[2];
arr[0] = 1;
arr[1] = arr[0] + 1;
printf("%d", arr[1]);
return 0;
}
0
1
2
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
C++ Array

Quiz
•
University
15 questions
Data Analytics using Python - Quiz 2

Quiz
•
University
12 questions
Java - arrays and String methods

Quiz
•
9th - 12th Grade
10 questions
DAA Quiz 1

Quiz
•
University
15 questions
module3

Quiz
•
University
9 questions
Software development set #1

Quiz
•
11th Grade
15 questions
numpy library

Quiz
•
University
15 questions
Java Quiz based on array

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