10 Questions
What are tokens in C++?
Tokens are the smallest building block or smallest unit of a C++ program.
Why can't keywords be used as variable names in C++?
Keywords are pre-defined or reserved words in a programming language and cannot be redefined for other purposes.
How many keywords are supported in the C language?
C language supports 32 keywords.
How many additional keywords are present in C++ compared to C?
In C++, there are 31 additional keywords compared to C.
Can keywords be redefined in C++?
No, keywords cannot be redefined in C++.
What are identifiers used for in C++?
Identifiers are used as the general terminology for the naming of variables, functions, and arrays.
Can identifiers in C++ start with a digit?
No, identifiers must begin with a letter or an underscore (_).
What are constants in C++?
Constants are values that cannot be modified during the program execution.
What are the types of constants in C++?
- Integer constants, 2. Real or Floating-point constants, 3. Octal & Hexadecimal constants, 4. Character constants, 5. String constants.
How are strings declared in C++?
Strings are declared using double quotes in C++.
Learn about C++ tokens, which are the smallest building blocks of a program, including keywords, identifiers, constants, strings, special symbols, and operators. Explore how keywords are pre-defined words with specific functions in a program.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free