Which keyword is used to declare a variable in C++?

C++ Basics Quiz

Quiz
•
Computers
•
University
•
Hard
Saqib Mahmood undefined
FREE Resource
62 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
define
auto
var
int
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name?
1stValue
int
_myVar
double
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of variables in C++?
To store data values
To perform loops
To define functions
To manage memory allocation
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you assign a value to a variable in C++?
int x := 5;
int x = 5;
x = 5;
let x = 5;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a valid declaration of an integer variable?
int x;
int x := 5;
int x == 5;
int x is 5;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to make a variable constant?
const
static
final
let
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of data can be stored in a variable of type int?
Decimal numbers
Whole numbers
Text
Boolean values
Create a free account and access millions of resources
Similar Resources on Quizizz
58 questions
C language

Quiz
•
University
61 questions
DAta Structure-unit 1&2

Quiz
•
University
60 questions
U23CS381 - ADD QUIZ Assessment

Quiz
•
University
60 questions
Programación

Quiz
•
KG - Professional Dev...
58 questions
C Programming Quiz

Quiz
•
University
62 questions
SAINS KOMPUTER TING 4 - 1.2 ALGORITMA

Quiz
•
12th Grade - University
61 questions
Baldwin University College (OSU ACCRA)

Quiz
•
University
60 questions
JavaScript -MIDTERM EXAM

Quiz
•
University
Popular Resources on Quizizz
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