Arrays 2022/02/15

Quiz
•
Computers
•
10th Grade
•
Easy

André Carvalho
Used 6+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int array_exemplo[5];
Esta instrução realiza algo ao array_exemplo. O que se será?
Inicializa o array
Declara o array
insere 5 elementos no array
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int array_exemplo[5];
Os indices deste array variam entre:
1 e 5
5 e 9
0 e 4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Se pretender inicializar todos os elementos do seguinte array então o que deverá acrescentar ao final da seguinte instrução?
int array_exemplo[5]
= [3,4,6,7,23]
= {20,7,78,89}
= {56,23,34,99,2}
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int array_exemplo[5] = {20 , 30 , 10 , 50 , 40};
for(int i = 0; i < ???? ; i++) {
cout << i << ": " << array_exemplo[i] << "\n"; }
Se quiser listar no ecrã os valores de todos os elementos do array então qual deverá ser o valor em falta (????) na condição do ciclo FOR?
4
20
5
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
A ________ de um dado valor x num array é realizada comparando esse valor com o 1º elemento do array e sucessivamente comparando x com cada um dos restantes elementos do array.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Este é um extrato do código para ordenação crescente de um array. Na condição falta o sinal. Qual deverá ser?
>
<
=
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int func( int valor )
{
int i;
for (i = 0; i < 5; i++){
if (array_exemplo[i] == valor)
return i;}
return -1;
}
Esta função realiza que operação?
Percorre todos os elementos do array array_exemplo.
Ordena o array array_exemplo.
Pesquisa um valor em 5 elementos do array array_exemplo. Caso encontre então retorna o indice do elemento.
Similar Resources on Wayground
12 questions
C++ References

Quiz
•
6th - 12th Grade
11 questions
Trabajando con ArrayList

Quiz
•
9th - 12th Grade
11 questions
CodeHS 5.3 Using Arrays

Quiz
•
9th - 12th Grade
12 questions
S1 Start if

Quiz
•
10th Grade
10 questions
Câu lệnh rẽ nhánh

Quiz
•
10th Grade
12 questions
Условия

Quiz
•
10th Grade
7 questions
Tutorial 6 - Fundamental of C Programming

Quiz
•
9th - 12th Grade
10 questions
Post Test C++

Quiz
•
9th - 12th Grade
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
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade