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
Cues T1 Prog_Base_Datos II 24-25

Quiz
•
11th Grade
6 questions
Translate to Math

Quiz
•
9th Grade - University
10 questions
Quiz Javascript Basic Pertemuan 3

Quiz
•
9th - 12th Grade
10 questions
Advanced Java Study Guide

Quiz
•
11th - 12th Grade
12 questions
C++ References

Quiz
•
6th - 12th Grade
10 questions
Objects & Classes

Quiz
•
11th - 12th Grade
12 questions
Project-Stem Unit 1 python coding

Quiz
•
9th - 12th Grade
10 questions
Examen de Programación II 24-25

Quiz
•
11th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade