Bifalgorithm post · Computer science one · Operators

What happens when you reassign a const variable in C?

What happens when you reassign a const variable in C? (Computer science one · Operators) — "15. Basics 1 const int secret = 42; 2 const double salesTaxRate = 0…

Ideas in this flowchart

  • Grundlagen von const-Variablen
  • const-Variablen speichern Werte, die nicht neu zugewiesen werden können.
  • const int secret = 42;
  • const double salesTaxRate = 0.075;
  • Der Versuch, den Wert einer const-Variablen neu zuzuweisen, verursacht einen Compilerfehler.
Feed/

What happens when you reassign a const variable in C?

No cover

Channel

Computer science one

1 page

"15. Basics 1 const int secret = 42; 2 const double salesTaxRate = 0.075; Any attempt to reassign the values of const variables will result in a compiler error."

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.