GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  OOPS

 Print  |  
Question:   Why preincrement operator is faster than postincrement?



December 12, 2006 16:08:57 #2
 GAURAV MODY   Member Since: Visitor    Total Comments: N/A 

RE: Why preincrement operator is faster than postincr...
 

the pre inc operator increments the value of that particular variable on that line itself

the post inc operator increments the value of that particular variable  after going on the next line

in simple words

eg.

e=5;    on this line value of e=5

e++;     on this line value of e=5

++e;     on this line value of e=7.

gaurav mody.

     

 

Back To Question