
Array in C

Quiz
•
Computers
•
University
•
Medium
Athulya SRK
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {10, 20, 30, 40, 50};
printf("%d %d %d\n", arr[0], arr[2], arr[4]);
return 0;
}
10 20 30
20 40 50
10 30 50
30 40 50
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3};
arr[1] = 10;
arr[0] = arr[1] + arr[2];
printf("%d %d %d\n", arr[0], arr[1], arr[2]);
return 0;
}
1 2 3
13 10 3
1 10 3
13 10 12
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3, 4, 5};
int i;
for (i = 0; i < 5; i++) {
printf("%d ", arr[i]);
}
printf("\n");
return 0;
}
1 2 3 4 5
1 2 3 4
2 3 4 5
1 3 5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3};
printf("%d\n", arr[3]);
return 0;
}
3\n
%d\n
-858993460
3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {5, 10, 15, 20};
printf("%d %d\n", arr[1], arr[3]);
return 0;
}
10 20
5 15
10 15
15 20
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {0, 1, 2, 3};
printf("%d\n", arr[4]);
return 0;
}
2\n
0\n
1\n
Segmentation Fault
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int arr[] = {4, 5, 6};
arr[2] = arr[0] + arr[1];
printf("%d %d %d\n", arr[0], arr[1], arr[2]);
return 0;
}
4 5 6
4 9 6
9 5 6
4 5 9
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
BASIC C PROGRAMMING QUIZ

Quiz
•
University
10 questions
POST TES MATRIKULASI

Quiz
•
10th Grade - University
13 questions
ÔN TẬP C - mảng 1 chiều

Quiz
•
University
10 questions
Pengantar Coding

Quiz
•
University
15 questions
c star 2

Quiz
•
University
15 questions
BASIC C PROGRAMMING

Quiz
•
University
10 questions
Expression in C Programming

Quiz
•
University
12 questions
Operators in C

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University