GATE CSE
First time here? Checkout the FAQ!
x
0 votes
30 views
while (++x){

}

here ++x is executed first and then condition is checked or first condition is checked then ++x
asked in Programming by Veteran (13k points)   | 30 views
++x is pre incremet.so first 'x' is incremented then check the condition.
same in case of a[++x] i.e array access?
yes.
thanks @santhosh..:-)

Please log in or register to answer this question.



Top Users May 2017
  1. akash.dinkar12

    3154 Points

  2. pawan kumarln

    1630 Points

  3. sh!va

    1590 Points

  4. Arjun

    1350 Points

  5. Devshree Dubey

    1246 Points

  6. Angkit

    1044 Points

  7. Debashish Deka

    1022 Points

  8. Bikram

    972 Points

  9. LeenSharma

    836 Points

  10. Prashant.

    692 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. pawan kumarln

    256 Points

  2. Ahwan

    236 Points

  3. jjayantamahata

    114 Points

  4. joshi_nitish

    114 Points

  5. Arnab Bhadra

    94 Points


22,731 questions
29,061 answers
65,101 comments
27,627 users