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
11 questions
Quiz 2: C++ Basics

Quiz
•
University
10 questions
IOTA : Web Development Bootcamp Quiz 3

Quiz
•
University
15 questions
python basics

Quiz
•
11th Grade - University
10 questions
CR1-Introducción a la Programación con Python

Quiz
•
University
10 questions
ECE-C Quiz _3

Quiz
•
University
10 questions
SS2425 WMAD S6+L17 Quiz Time

Quiz
•
University
10 questions
Móviles 2 - Sesión 01

Quiz
•
University
7 questions
10 бет параллель

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University