
York College Week 5 #2 C++ Variables Review
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
Mr. Martin
Used 10+ times
FREE Resource
Enhance your content in a minute
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for declaring a variable in C++?
variable_name: data_type;
variable_name data_type;
data_type variable_name;
variable_name = data_type;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize a variable in C++?
Using the assignment operator (=) followed by the initial value
Using the declaration operator (:) followed by the initial value.
Using the increment operator (++) followed by the initial value.
Using the multiplication operator (*) followed by the initial value.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between declaring and initializing a variable?
Declaring a variable is creating a variable and specifying its scope, while initializing a variable is assigning a value to the declared variable.
Declaring a variable is creating a variable and specifying its data type, while initializing a variable is assigning a value to the declared variable.
Declaring a variable is creating a variable and specifying its value, while initializing a variable is assigning a data type to the declared variable.
Declaring a variable is assigning a value to the declared variable, while initializing a variable is creating a variable and specifying its data type.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the keyword used to declare a constant in C++?
let
var
constant
const
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can the value of a constant be changed during program execution?
Yes
Sometimes
It depends
No
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of using constants in C++?
To create variables whose values cannot be changed once they are assigned.
To create variables with dynamic values.
To create variables with random values.
To create variables whose values can be changed once they are assigned.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable in C++?
The scope of a variable in C++ refers to the data type of the variable.
The scope of a variable in C++ refers to the lifetime of the variable.
The scope of a variable in C++ refers to the size of memory allocated for the variable.
The scope of a variable in C++ refers to the region of the program where the variable is visible and can be accessed.
Create a free account and access millions of resources
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
21 questions
Lecture Exercise Topic 1.3
Quiz
•
12th Grade
20 questions
แบบทดสอบปลายภาคโปรแกรมแอนิเมชัน
Quiz
•
9th - 12th Grade
20 questions
Nuevas tecnologías
Quiz
•
6th Grade - Professio...
20 questions
Quiz ASJ
Quiz
•
12th Grade
17 questions
Quiz 01 Keamanan Jaringan
Quiz
•
12th Grade
17 questions
Storage
Quiz
•
9th - 12th Grade
17 questions
Cuestionario sobre Software Educativo
Quiz
•
8th Grade - University
20 questions
Quiz
•
7th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
