C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » Programming Tips & Tricks » C - Tips & Tricks

C - Pre-Increment is faster than post-increment

By: IncludeHelp, on 21 JAN 2017

We already know that there are two kinds of unary operators which are used to increase a value by 1. Pre-Increment and Post-Increment.

Pre-increment is faster than post-increment because post increment keeps a copy of previous (existing) value and adds 1 in the existing value while pre-increment is simply adds 1 without keeping the existing value.

Liked this article? Do share with your friends :)