
Repetition and Looping
Authored by Hanin Hamzah
Science
1st - 10th Grade
Used 17+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What are the three basic types of looping structures?
a. counting loop, sentinel-controlled loop, and result-controlled loop
b. infinite loop, counting loop, nested loop
c. while loop, for loop, do while loop
d. count up loop, count down loop, infinite loop
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following program fragment?
for ( int j = 0; j < 5; j++ )
{
cout<< j << " " ;
}
cout<<endl;
a. 0 1 2 3 4 5
b. 0 1 2 3 4
c. 0 1 2 3 4 5 6
d. j j j j j
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code fragment?
for ( int j = 10; j > 5; j-- )
{
cout<< j + " " ;
}
cout<<endl;
a. 10 11 12 13 14 15
b. 9 8 7 6 5 4 3 2 1 0
c. 10 9 8 7 6 5
d. 10 9 8 7 6
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What must the test be so that the following fragment prints out the integers 5 through and including 15?
for ( int j = 5; ________ ; j++ )
{
cout<< j<< " " ;
}
cout<<endl;
a. j<15
b. j<=16
c. j<16
d. j==15
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What must the change be so that the following fragment prints out the even integers 0 2 4 6 8 10?
for ( int j = 0; j <= 10; _______ )
cout<< j << " " ;
}
cout<<endl;
a. j+2
b. j = j+2
c. j++++
d. j++
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What must the initialization be so that the following fragment prints out the integers -3 -2 -1 ?
for ( _______; j < 0; j++ )
}
cout<< j << " " ;
}
cout<<endl;
a. int j = 0
b. int j < 0
c. int j = -3
d. int j = -4
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code fragment?
for ( int j = 5; j > -5; j-- )
{
cout<< j << " " ;
}
cout<<endl;
a. -5 -4 -3 -2 -1 0
b. 5 4 3 2 1 0
c. 5 4 3 2 1 0 -1 -2 -3 -4 -5
d. 5 4 3 2 1 0 -1 -2 -3 -4
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
15 questions
PRETEST dan POSTTEST INHOUSE TRAINING EWS DAN CODE BLUE SISTEM
Quiz
•
1st Grade
20 questions
Science Form 2 KSSM Topic 8
Quiz
•
8th Grade
14 questions
Tốc độ phản ứng và CBHH
Quiz
•
10th - 12th Grade
15 questions
science
Quiz
•
1st - 5th Grade
20 questions
KUIS IPA MATERI HITUNGAN MASSA JENIS, SUHU, KALOR, PEMUAIAN
Quiz
•
9th Grade - University
21 questions
TARDES DE CIENCIA
Quiz
•
1st - 12th Grade
14 questions
Wetlands
Quiz
•
5th Grade
20 questions
Mentalité de croissance
Quiz
•
7th - 10th Grade
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Science
22 questions
Phases of the moon
Quiz
•
8th Grade
12 questions
Structures and Functions
Quiz
•
3rd - 5th Grade
10 questions
Heating / Cooling Matter
Quiz
•
1st Grade
20 questions
Rocks and The Rock Cycle
Quiz
•
6th Grade
20 questions
Weathering, Erosion, Deposition
Quiz
•
5th Grade
22 questions
Ancient Greece
Quiz
•
3rd Grade
15 questions
Physical and Chemical Changes
Quiz
•
4th Grade
10 questions
Plants Respond to Stimuli
Quiz
•
3rd Grade