A C program has the following declaration and initial assignments- int i=2, j=5; float x=. 25, u=-. 1; char c='a', d='b'
Determine the value of 1.++i 2. i++
Answers
Answered by
0
1. pre increment (++i)
initially i=2 ,
then it is also initially incremented by 1
i = 3
i = 3
2. Post increment ( i++ )
initially i=2,
then the i remains same initially
i=2
And finally the value of i incremented by 1
i=2
i=3
Is this answer helpful to u ?....
initially i=2 ,
then it is also initially incremented by 1
i = 3
i = 3
2. Post increment ( i++ )
initially i=2,
then the i remains same initially
i=2
And finally the value of i incremented by 1
i=2
i=3
Is this answer helpful to u ?....
Similar questions