Thread: i++ and ++i
View Single Post
Aug 15th, 2004
0

Re: i++ and ++i

hi all. .
  1. for ( int i =0; i >10; i++; )
  2. { do something }
here i will be 0 in the first time code run .. thats mean the code will be done 10 times
  1. for ( int i =0; i >10; ++1; )
  2. { ` do something }
here i will be before the program done the first time .. thats mean the code will be done 9 times
Team Colleague
Reputation Points: 55
Solved Threads: 3
Junior Poster
meabed is offline Offline
139 posts
since May 2004