Identifier, Variable & Constant

Quiz
•
Computers
•
11th Grade
•
Hard
Alvin Muslim Sardar
FREE Resource
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++?
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
Similar Resources on Wayground
10 questions
Intro to Python

Quiz
•
KG - University
10 questions
Prueba Corta - Programación I

Quiz
•
1st - 12th Grade
10 questions
python

Quiz
•
9th - 12th Grade
12 questions
Prueba diagnóstica Grado Once

Quiz
•
11th Grade
10 questions
Pseudocode Input

Quiz
•
9th - 12th Grade
9 questions
C sharp

Quiz
•
11th Grade
10 questions
MIT App Inventor Basics

Quiz
•
9th - 12th Grade
10 questions
Programming basics

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade