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
15 questions
CPA - PROGRAMMING ESSENTIALS IN C++ (CISCO)

Quiz
•
University
10 questions
C++ Variables, Literals, and Constants Quiz

Quiz
•
University
10 questions
T_4.2 Identifier, Data Types, Operators & Expressions

Quiz
•
12th Grade - University
10 questions
Basics Of C Programming

Quiz
•
University
10 questions
C Programming Lab Quiz

Quiz
•
University
15 questions
1st session

Quiz
•
University
12 questions
C++ Basics (1)

Quiz
•
University
10 questions
Динамические библиотеки

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade