
LAB-Array-String
Authored by Rishabh Tomar
Computers
University
Used 12+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize an array in C?
int arr[3] = (1,2,3);
int arr(3) = {1,2,3};
int arr[3] = {1,2,3}
int arr(3) = (1,2,3)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of C Program.?
int main() {
int a[] = {1,2,3,4};
int b[4] = {5,6,7,8};
printf("%d,%d", a[0], b[0]);
}
1,5
2,6
0,0
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of C program.?
int main()
{
float marks[3] = {90.5, 92.5, 96.5};
int a=0;
while(a<3)
{
printf("%.2f,", marks[a]); a++;
}
}
90.5 92.5 96.5
90.50 92.50 96.50
0.00 0.00 0.00
Compiler error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of C Program.?
int main() {
int a[3] = {10,12,14};
a[1]=20;
int i=0;
while(i<3)
{ printf("%d ", a[i]);
i++; }
}
20 12 14
10 20 14
10 12 20
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
8.Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?
arr[6]
arr[7]
arr{6}
arr{7}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the minimum and maximum Indexes of this below array.?
int main()
{
int ary[9];
return 0;
}
-1, 8
0, 8
1,9
None of the above
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
How can I store the value 10 into the second row, first column of my array that I have declared as int numbers[10][10]?
int numbers[1][2] = 10;
numbers[1][2] = 10;
numbers[2][3] = 10;
numbers[1][0] = 10
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
16 questions
Think it through
Quiz
•
University - Professi...
15 questions
Fundamentals of Algorithms - Unit 1 - Test 1
Quiz
•
University
15 questions
Quiz 1
Quiz
•
University
20 questions
Kuis LPK Fungsi
Quiz
•
University
20 questions
POO_BasicoyJava
Quiz
•
University
15 questions
8051-MCQ
Quiz
•
University
20 questions
Control Structures C#
Quiz
•
University
19 questions
Programación Básica Prácticas Tema 2
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade