If a loop does not have a way of stopping, it is called an infinite loop.
Of the following which one is NOT infinite loop?
whileLoop
Quiz
•
Education
•
9th - 12th Grade
•
Medium
Umit Akdag
Used 5+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If a loop does not have a way of stopping, it is called an infinite loop.
Of the following which one is NOT infinite loop?
while (number < 5) ;
{ cout << "Hello" ;
number++; }
int number = 0 ;
while (number < 5)
{ cout < "Hello"; }
while (number < 5)
cout < "Hello";
number++;
while (number < 5)
{ cout < "Hello";
number++; }
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the result of this while loop ?
int number = 0;
while (number < 5)
{ cout << "Hello\n";
number++ ; }
Hello
Hello
Hello
Hello
Hello
Hello
Hello
HelloHelloHelloHello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
While loop will never iterate, if the test expression is false to start with.
T / F ?
TRUE
FALSE
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
in the test expression(condition), any NONZERO value is evaluated as true.
T / F ?
FALSE
TRUE
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The while loop is especially useful for validating input. If an invalid value is entered, a loop can require that the user reenter it as many times as necessary.
Which one is a while Loop for Input Validation?
8 questions
Arduino_01
Quiz
•
6th - 12th Grade
10 questions
Exploring Python Data Types
Quiz
•
11th Grade - University
10 questions
Python IF Statements
Quiz
•
9th - 12th Grade
10 questions
SOAL TPMM 1
Quiz
•
10th Grade
10 questions
Java Strings
Quiz
•
1st Grade - Professio...
10 questions
Сабақты бекіту
Quiz
•
10th Grade
10 questions
Python quiz
Quiz
•
KG - Professional Dev...
10 questions
Python-Minigame-W9
Quiz
•
9th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University