
Identifier, Variable & Constant
Authored by Alvin Muslim Sardar
Computers
11th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is a valid C++ identifier?
2variable
variable_name
variable-name
@variable
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is a correct way to declare an integer variable in C++?
Which of the following is a correct way to declare an integer variable in C++?
int 1number;
integer num;
int number;
num int;
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What keyword is used to define a constant in C++?
constant
const
fixed
static
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
How do you initialize a variable in C++?
int num = 10;
int num : 10;
num = int 10;
int = num 10;
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following code snippet?
0
5
value
error
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will happen if you try to modify a 'const' variable in C++?
The code will compile successfully
The value will be changed
An error will occur
The program will crash
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following correctly represents a floating-point constant in C++?
3.14
3.14f
3.14F
All correct
Access all questions and much more by creating a free account
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
10 questions
Javascript & Client side scripting
Quiz
•
10th - 12th Grade
10 questions
SUBMARINE LIFE
Quiz
•
10th Grade - Professi...
12 questions
Word Processing Terms
Quiz
•
8th - 12th Grade
12 questions
Post Test Pengenalan Pemrograman Bahasa C++
Quiz
•
11th Grade
10 questions
I Can Code!
Quiz
•
KG - University
12 questions
Premiere Pro CC File Formats
Quiz
•
6th Grade - University
10 questions
STM BTEC DIT 3- 5. Maintenance, set-up, performance p152
Quiz
•
9th - 11th Grade
11 questions
Execl Quiz
Quiz
•
7th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade