C++ Identifiers and Constants Quiz

Quiz
•
Computers
•
University
•
Hard
NURUL (PMJ)
Used 2+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
C++ Basics (1)

Quiz
•
University
10 questions
Cuestionario Kotlin Básico

Quiz
•
University
8 questions
Kuizi 4.3

Quiz
•
University
15 questions
AITT LAB QUIZ 1

Quiz
•
University
10 questions
20EC204 Digital System Design Surprise Quiz

Quiz
•
University - Professi...
11 questions
Java Identifiers Quiz

Quiz
•
University
15 questions
Prelims_IntProg_HO2

Quiz
•
University
15 questions
Semifinal Quiz

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University