0
In any iteration process... when initializing a variable ..if you put the value to be beyond 1000's then the output changes no??
11 Respuestas
+ 1
try it yourself...input a bigger number in a program and see the output.
+ 1
I was saying that when I try out one simple program to print a number with some conditions then the output changes the number...... conditions I put are not affecting the input number..
+ 1
yeah but you try this
int a=10000000000000000000000
and then print
number changes??
+ 1
just try it in your text editor
+ 1
yes I know I just tried a big number and just asked about my doubt with the output thats it...anyway thanks
0
Well, in what way do you think it will change?
0
Well, if I put a bigger number, that bigger number comes out, indeed.
http://www.sololearn.com/app/sololearn/playground/c9v90Q79XGMZ/
0
But what was your question?
0
Okay, I think that depends on the type of variable you use to store that number. If you use value types, the original will not change if you put a=3, b=a, b=5. But if you're using reference (aka handle) types, the variables do not store the number itself, but a reference to that number. So when you change the variable, you change the number that is referred to (from multiple different variables). Does that make sense?
0
No, why would it change?
0
I don't understand why it has to be a big number, do you mean at some point the variable overflows?