York College Week 5  #2  C++ Variables Review

York College Week 5 #2 C++ Variables Review

12th Grade

22 Qs

quiz-placeholder

Similar activities

Komunikasi dalam Jaringan

Komunikasi dalam Jaringan

10th - 12th Grade

21 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

Tech Trivia, Part III

Tech Trivia, Part III

7th - 12th Grade

20 Qs

Quiz Pemrograman Perangkat Bergerak 2

Quiz Pemrograman Perangkat Bergerak 2

12th Grade - University

20 Qs

To meet the horizon

To meet the horizon

11th - 12th Grade

20 Qs

Week #7 - Time Machine

Week #7 - Time Machine

8th Grade - University

17 Qs

découvrir l'outil informatique

découvrir l'outil informatique

KG - Professional Development

18 Qs

Quizz SO

Quizz SO

12th Grade

20 Qs

York College Week 5  #2  C++ Variables Review

York College Week 5 #2 C++ Variables Review

Assessment

Quiz

Computers

12th Grade

Practice Problem

Easy

Created by

Mr. Martin

Used 10+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?