
C Programming - Array MCQs

Quiz
•
Information Technology (IT)
•
University
•
Medium
PRIYADHARSHNI S
Used 4+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An array is:
A collection of different data types
A collection of variables of same data type
A dynamic list
A structure
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The index of the first element of an array in C is:
1
-1
0
Depends on compiler
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The correct way to declare an array of 10 integers is:
int arr(10);
int arr[10];
array int arr[10];
int arr[] = 10;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of: int arr[5] = {1,2,3}; printf("%d", arr[4]);
3
4
0
Garbage value
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will sizeof(arr) return for: int arr[5];
5
10
20
Depends on values
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these initializes all elements to 0?
int arr[5] = {0};
int arr[5];
int arr[5] = {1};
int arr[] = {1,2};
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does arr[2] access in: int arr[3] = {1, 2, 3};
1
2
3
Compilation error
Create a free account and access millions of resources
Similar Resources on Wayground
40 questions
Ulangan Harian

Quiz
•
11th Grade - University
35 questions
2nd Year Data Structures Quiz Qn

Quiz
•
University
41 questions
Array and Pointer Quiz

Quiz
•
University
41 questions
JABA!

Quiz
•
University
38 questions
7-20

Quiz
•
7th Grade - University
37 questions
8 класс цикл

Quiz
•
8th Grade - University
40 questions
Java MCQ Quiz

Quiz
•
University
35 questions
Câu hỏi về hàm Excel

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade