How many times will the loop execute?
unsigned char half_limit = 150;
for (unsigned char i = 0; i < 2 * half_limit; ++i)
{
// do something
}
Robotics Quiz
Quiz
•
Computers, Science, Mathematics
•
1st - 12th Grade
•
Hard
joshua igoni
Used 5+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many times will the loop execute?
unsigned char half_limit = 150;
for (unsigned char i = 0; i < 2 * half_limit; ++i)
{
// do something
}
150
500
Infinite
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
what will be the value of "i" and "j" when the following code is executed?
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you create a variable with the floating Number 2.8?
int x = 2.8;
x = 2.8;
double x = 2.8;
byte x = 2.8
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which header file lets us work with input and output objects?
#include <stream>
#include <iostream>
#include <inputstr>
#include <iosstring>
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you start writing a while loop in c++?
x > y whlle {
while x > y {
while x > y:
while (x > y)
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
what is the correct syntax to output "hello world" in c++?
System.out.println("hello world");
cout << "hello world";
print ("hello world");
Console.Writeline("hello world");
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Does both the loops in the following program print the correct string length?
Yes, Both the loops print the correct length
Only for loop prints the correct length
Only while loop prints the correct length
Compile error in the program
8.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the program?
5
Address of "x"
Compile error
10
10 questions
Producto Vectorial
Quiz
•
10th Grade
13 questions
Complex Numbers
Quiz
•
11th - 12th Grade
12 questions
Complex Numbers and Operations
Quiz
•
10th Grade - University
10 questions
Complex Numbers
Quiz
•
11th Grade - University
13 questions
Simplifying Imaginary Numbers and Adding/Subtracting Complex Numbers
Quiz
•
11th Grade
10 questions
OPERASI VEKTOR (penjumlahan, pengurangan, perkalian skalar)
Quiz
•
10th Grade
11 questions
VEKTOR
Quiz
•
7th Grade
12 questions
Algebra 2B - 4.2 Quiz Practice
Quiz
•
9th 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
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
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
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