
C++ Identifiers and Constants Quiz
Authored by NURUL (PMJ)
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid identifier in C++?
100students
Vari@bles
my_school
Playing Football
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the maximum number of characters allowed in an identifier in most programming languages?
31
15
50
100
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT allowed in an identifier name?
Letters
Numbers
Underscore (_)
Spaces
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C++, what happens when you use an identifier that matches a reserved word?
The program will run as normal
The compiler will treat it as a special variable
It will cause a syntax error
It will be ignored
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for declaring a constant in C++?
const datatype variable_name;
datatype const variable_name = value;
datatype variable_name;
#define variable_name value
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a reserved word in C++?
myVariable
int
my_school
student
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data types can be used to declare a variable in C++?
char
int
float
All of the above
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
15 questions
Assessment 08
Quiz
•
University
7 questions
ESBrotherX_Medical AI_Lecture
Quiz
•
University
11 questions
Video Watermaking
Quiz
•
University
10 questions
Funcionamiento de internet
Quiz
•
University
13 questions
bts
Quiz
•
KG - Professional Dev...
10 questions
MI MÉTODO
Quiz
•
University
10 questions
Microcontroller
Quiz
•
11th Grade - University
14 questions
Input, output and storage de
Quiz
•
8th Grade - Professio...
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University