wleci
AboutProjectsBlogContact
Contact
Back to blog
INF.04ProgrammingLanguage Basics

Reserved Keywords: List of Key Terms in IT

Understand what keywords are in programming languages. Learn why you can't use them as variable names and see lists for C++, Java, and Python.

December 25, 20253 min read
Share:

Reserved Keywords

Every programming language has its own "dictionary" of words that have special meaning to the compiler or interpreter. These are the foundations of syntax that you cannot use to name your own variables, functions, or classes. It's like trying to name your child "Bus Stop" – in everyday language, that word is already taken by the transportation system.

Keyword

A reserved identifier that has a defined meaning in a given programming language. It is used to define control structures (if, for), data types (int, char), or permissions (public, private).

Why are they reserved?

The compiler needs to know when you are starting a loop or declaring a function. If you named a variable if, the program wouldn't know if you wanted to check a condition or get a value from the variable. This would cause chaos and syntax errors.

Comparison of Keywords in Popular Languages

While many languages (like C, C++, and Java) share similar keywords, each has unique terms.

CechaLanguageTypical Keywords
C / C++int, double, static, volatile, struct32 (C) / 90+ (C++)
Javaextends, implements, interface, finalapprox. 50
Pythondef, lambda, None, pass, withapprox. 35

Common Mistakes and Pitfalls

Variable Naming

Attempting to use a keyword as a variable name (e.g., int char = 5;) will result in a compilation error. If you really need a similar name, use a prefix like myChar or _char.

Case Sensitivity

In languages like C++ or Java, keywords are written in lowercase. __IF__ is not the same as __if__. However, in Python, logical words like __True__ and __False__ start with an uppercase letter.

Examples of Keywords in Action

See how the same keywords build logic in different technologies:

cpp
int main() { for(int i=0; i<10; i++) { if(i % 2 == 0) continue; return 0; } }

Pro Tips

Syntax Highlighting

Modern code editors (IDEs) automatically color-code keywords. If a word you typed as a variable name suddenly changes color (e.g., to purple or blue), it is likely a reserved keyword.

Identifier Naming Checklist

How to create names safely?

0/4

Quiz: Check Your Knowledge

Which of the following words is a reserved keyword in Python?

Code Analysis Process (Mermaid)

What Next?

  • Learn naming conventions like camelCase or snake_case.
  • Check the reserved words list in SQL – they differ from general-purpose languages.
  • Explore contextual keywords (e.g., var in C#) which are only critical in specific places.
  • Review INF.04 exam materials to ensure you know the syntax of required languages.
  • Try writing a script that checks if a given string is a keyword.

You might also like

INF.04Programming

Relational and Logical Operators: How to Compare Data?

Understand how comparison operators work and how to combine conditions using AND, OR, and NOT. Essential knowledge for control statements.

2 min read
INF.04Programming

Conditional Operator: Short-hand if-else in one line

Learn the ternary operator. Find out how to shorten your code and when to use it instead of classic if-else statements.

2 min read
INF.04Programming

Mathematical Operators: The Foundation of Computing

Learn basic and advanced mathematical operators. Understand how modulo, incrementation works, and why operator precedence matters.

3 min read
Back to blog
wleci.pl

Full-stack Developer

I build modern web applications with passion for clean code and good design.

[email protected]
Poland

Navigation

  • Home
  • About
  • Projects
  • Blog
  • Contact

Services

  • Web applications
  • Websites
  • API & Backend
  • Consulting

Technologies

  • React / Next.js
  • TypeScript
  • Node.js
  • PostgreSQL

Social

© 2026 wleci.pl. All rights reserved.

Privacy policy•Terms of service

Made with in Poland