Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
C++ is a statically typed language  every variable must be declared with a type. Choosing the right type avoids memory waste and overflow bugs.
int age = 25;long long big = 1e18;float pi = 3.14f;double e = 2.71828;char grade = 'A';bool flag = true;string name = "THINK++";long long for problems involving large numbers (≥10â¹)float for comparisons  precision errors are commonint as default; switch to long long only when needed