About 316,000 results
Open links in new tab
  1. Constants in C++ - GeeksforGeeks

    Jul 23, 2025 · In C++, const is a keyword used to declare a variable as constant, meaning its value cannot be changed after it is initialized. It helps protect important values from accidental …

  2. C++ Constant Variables - W3Schools

    Constants When you do not want others (or yourself) to change existing variable values, use the const keyword (this will declare the variable as "constant", which means unchangeable and …

  3. C++ Variables, Literals and Constants - Programiz

    In this tutorial, we will learn about variables, literals, and constants in C++ with the help of examples. In programming, a variable is a container (storage area) to hold data.

  4. 5.1 — Constant variables (named constants) – Learn C++

    Oct 17, 2024 · Constant variables (covered in this lesson). Object-like macros with substitution text (introduced in lesson 2.10 -- Introduction to the preprocessor, with additional coverage in …

  5. C++ (C Plus Plus) | Variables | Constant Variables | Codecademy

    Nov 9, 2024 · Constant variables in C++ are variables whose values cannot be altered after they are set. By using the const keyword, a variable becomes read-only, preventing accidental …

  6. 3.3: Constants and Variables - Engineering LibreTexts

    As the name suggests the name constants is given to such variables or values in C++ programming language which cannot be modified once they are defined. They are fixed values …

  7. C++ Variables, Identifiers, and Constants Guide

    Learn about C++ variables, identifiers, and constants. This guide covers how to declare, assign, and use variables, the rules for identifiers, and defining unchanging constants with the 'const' …

  8. C++ Constants - W3Schools

    Constants are like a variable except that once defined, their value never changes during the program's execution. In this tutorial, you will learn about Constants in C++.