Electronics and Communication Engineering - Microprocessors - Discussion


Expression ++i is equivalent to

[A]. i = i + 2
[B]. i = i + 1
[C]. i = i - 1
[D]. i = i + i + i

Answer: Option B


i is incremented by 1.

Bharathi said: (May 6, 2015)  
Can you please explain these bit in detail manner.

Priya said: (Jan 15, 2016)  
How many interrupt request lines are available in programmable interrupt controller 8259A?

Vinay said: (Sep 4, 2016)  
I think it's i++.

Tejaswini Mane said: (Sep 13, 2017)  
Please explain in detail.

Tejaswi said: (Sep 29, 2017)  
I think it's i+1.

Nandan said: (May 14, 2019)  
++i means Pre increment, That means, you have increase number by 1.

i++ means post-increment, That means, you have increase number by 1.

Leela Durga said: (May 19, 2019)  
What is the difference between pre and post increments?

Both are increased by 1, right?

Shahina said: (Feb 14, 2020)  
++i means pre-increment. That means 1st you increase the no then assign to i.
i++ means post-increment. That means 1st you have to assign the value thereby increment by 1.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.