
C++ Programming Test

Quiz
•
Computers
•
6th - 8th Grade
•
Hard
JUNIEL BRAVO
Used 6+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of cin in C++?
To output text to the console
To read input from the console
To declare a variable
To perform a mathematical operation
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax for the cout statement in C++?
Console.out("Hello World");
System.out.print("Hello World");
cout << "Hello World";
print("Hello World");
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an if statement in C++?
To repeat a block of code a certain number of times
To exit a loop
To compare two values and execute code if they are equal
To check if a condition is true and execute code if it is
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an else statement in C++?
To execute code if the previous if condition is false
To execute code if the previous if statement is true
To compare two values and execute code if they are equal
To exit a loop
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid C++ data type?
int
false
float
boolean
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a while loop and a for loop in C++?
A for loop is used for repeating a block of code a certain number of times, while a while loop is used for repeating a block of code while a condition is true.
A while loop is used for repeating a block of code a certain number of times, while a for loop is used for repeating a block of code while a condition is true.
A for loop is used for reading input from the console, while a while loop is used for outputting text to the console.
A while loop is used for outputting text to the console, while a for loop is used for reading input from the console.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax for declaring a variable of type int in C++?
integer x = 5;
x = 5;
int = x;
int x;
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Bilangan biner

Quiz
•
6th - 8th Grade
11 questions
массивы

Quiz
•
7th Grade
10 questions
HTML codes

Quiz
•
6th - 8th Grade
10 questions
HTML5 0

Quiz
•
8th Grade
12 questions
Basics of html

Quiz
•
8th Grade
15 questions
HTML review

Quiz
•
7th - 8th Grade
13 questions
Introduction to Arduino Robotics

Quiz
•
7th Grade
13 questions
Test

Quiz
•
7th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
25 questions
Exploring POV and Unreliable Narrators

Quiz
•
7th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
20 questions
Typing Practice

Quiz
•
7th - 12th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade