Sunday, May 17, 2020

Tip of the day!




Pre/Post increment

In pre-increment operand will be altered in value before it is utilized. In post-increment operand will be altered after it is utilized.
In the above snippet 
x = ++a is equivalent to
a = a +1 then
x = a
y = b++ is equivalent to
y = b
then b = b + 1

So the value of y = 10 and b = 11



No comments:

Post a Comment

Exploring float data type in C

Float is one among the basic data type in C.  Floating point numbers in C has precision up to 6 decimal places.  T he header file float.h de...