
CS1010 Lab 4
Authored by Gabriella Gloria
Computers
University

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the last element in a C array declared as int arr[10];?
0
1
9
10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize an array of size 5 in C?
int arr[5] = {1, 2, 3, 4, 5};
int arr[] = [5];
int arr = {1, 2, 3, 4, 5};
int arr[5] = (1, 2, 3, 4, 5);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given an array arr[] = {10, 20, 30, 40}, what is the value of arr[1]?
10
20
30
40
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about arrays in C is true?
The size of an array can be changed after it is declared.
Array elements are stored in contiguous memory locations.
An array can hold multiple data types.
The array index starts from 1.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to access an element out of the bounds of an array?
Compilation error
Runtime error
The program will terminate with an error
Undefined behavior
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given an array int arr[3] = {10, 20, 30};, what will arr[3] access?
30
Compilation Error
0
Undefined Behavior
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value stored in ptr?
The value of x
The memory address of x
10
Compilation error
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
10 questions
Module 09 - Day 3
Quiz
•
University
15 questions
COMPUTER NETWORK & SECURITY (QUIZ #4) MIDTERM 2024
Quiz
•
University
15 questions
Reti
Quiz
•
University
10 questions
KUIS PRA UAS
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
11 questions
Latex
Quiz
•
University
10 questions
FOP - CHAPTER 4
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
20 questions
Endocrine System
Quiz
•
University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
30 questions
W25: PSYCH 250 - Exam 2 Practice
Quiz
•
University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
38 questions
Unit 8 Review - Absolutism & Revolution
Quiz
•
10th Grade - University