0

Creating a variable reserves a memory location, or a space in memory for storing values. What is meant by values

31st Mar 2017, 6:11 PM
Ishan Barnwal
Ishan Barnwal - avatar
5 Answers
+ 6
int x; That has reserved x to be of int int x=17; That has reserved 17(which is a value) to x
31st Mar 2017, 6:14 PM
Meharban Singh
Meharban Singh - avatar
+ 5
Sorry,Thats all I can elaborate, I dont know c++, I explained in java,these are pretty similar languages
31st Mar 2017, 8:11 PM
Meharban Singh
Meharban Singh - avatar
+ 2
Please elaborate more. I don't understand. If your talking about Pointers you call them like int in = 55; int *ptr = &in
31st Mar 2017, 6:15 PM
David Najafi
David Najafi - avatar
0
int x = 24; In the expression above, type: int, variable: x and value is 24. 4 bytes (for integers) are taken from stack (memory), and 24 is written in that memory.
31st Mar 2017, 6:31 PM
murat
murat - avatar
0
Elaborate me also
31st Mar 2017, 6:51 PM
Ishan Barnwal
Ishan Barnwal - avatar