Search This Blog

Sunday, 25 November 2012

What is '&', lets clearify our concepts.



You can see a program at your right side.
It's simple.

Point to be noted: We say b = a;
When we increase b, the value of b will be increased but a will not change. Why? because b = a means that value of a will be stored in b. When we print 'a', the original value of a is printed.

In the second program, &b = a means that value of a is stored in b and "by changing b value of a will be changed".
In other words b and a correspond to same number (which is 1 initially).


No comments:

Post a Comment