If the value of the expression is not being used, ++n is preferred.
Most coding standards used by big companies require the prefix
operator to be used unless the pre-incremented value is required.
Don

On Sep 22, 7:54 am, Sahil Garg <[email protected]> wrote:
> n=n+1
>
> n++
>
> ++n
>
> which of the three is better ??
>
> Sahil Garg
> Computer Engg. DCE

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to