0
I don't understand what variables are.
im Bulgarian and i don't speak English very well so if somene can tell me this simple i will say much thanks for that.
3 Réponses
+ 3
Think of a box with names on it. The name of the variable is on the box's name and the content of the variable is the content of the box
+ 1
A variable is a place where you store data. There are multiple types of data like: int, float, bool, etc. A simple example: var x = 5; or var msg = "hello";
+ 1
A variable is a named storage location that can hold any data value.
A variable has two associated values:
1. rvalue. which is its data value ie.its contents .
2. lvalue. which is its location value ie. memory address.
In C++ variable can be declared in three ways:
1. Uninitialized variable
Eg: int val:
2. Initialized variable
Eg: int val=10;
3. Dynamic Initialized variable
Eg: int val=(b*c)-p ;
HOPE its usefull for you .
PEACE\/.