GATE CSE
First time here? Checkout the FAQ!
x
0 votes
35 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 (13.2k points)   | 35 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 Aug 2017
  1. Bikram

    3584 Points

  2. ABKUNDAN

    3404 Points

  3. akash.dinkar12

    3030 Points

  4. manu00x

    2446 Points

  5. rahul sharma 5

    2260 Points

  6. makhdoom ghaya

    2040 Points

  7. just_bhavana

    1880 Points

  8. Tesla!

    1596 Points

  9. pawan kumarln

    1574 Points

  10. learner_geek

    1504 Points


24,796 questions
31,868 answers
73,708 comments
30,011 users