
CC 102 - Array and Character Sequence
Authored by Daffodelle V. Lucena
Information Technology (IT)
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does an array store?
Values of different types
Elements of the same type in contiguous memory
Only character values
Random data in non-contiguous memory
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The first element of an array in C++ has an index of:
1
-1
0
Depends on the compiler
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly declares an array of 10 integers?
array int[10];
int num[10];
int num = [10];
int[10] num;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you access an index beyond the array’s size?
Compiler error
Nothing happens
Runtime error may occur
The compiler automatically resizes the array
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the declaration int foo[5] = {10, 20, 30};, what are the last two elements initialized to?
0
10
Random garbage values
Undefined
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to initialize an array with five elements?
int a[5] = {1, 2, 3, 4, 5};
int a[] = {1, 2, 3, 4, 5};
Both A and B
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of error occurs when you exceed the valid range of indices?
Compilation error
Logical/runtime error
Syntax error
Linker 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
50 questions
CompTIA Security+ SY0-701 Revision Test 1
Quiz
•
University
50 questions
Кәсіби ағылшын 201 - 250
Quiz
•
University
50 questions
KELAS XI BAB 1 INFORMATIKA DAN PEMBELAJARANYA
Quiz
•
11th Grade - University
50 questions
Uji Pemahaman Algoritma Pemrograman
Quiz
•
10th Grade - University
50 questions
Mengenal Algoritma Pemrograman Scratch
Quiz
•
10th Grade - University
50 questions
Java қазақша 51 - 100
Quiz
•
University
45 questions
IT2112 Networking 1 Quiz 1
Quiz
•
University
55 questions
PRELIM EXAM_INTERNET RESEARCH FOR BUSINESS
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
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University