This is a discussion on Why is preincrement operator is faster than postincrement? within the C and C++ Programming forums, part of the Software Development category; Hi, can u anyone give real example of above questions. Thanks, prasath.K...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi prasath, The concept of "passing by reference" itself is alien to C. And the post/pre-increment are not functions, they are operators. So, both of them have to increment whatever value is sent to them. If you understand the concept of passing by value, you will know that the value of the variable sent to the function will remain unchanged. As you are thinking if post increment passes the argument as "pass by value", then the value should not change at all. But, on the contrary, it also changes the value of the argument! Hope informative to you. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Faster Database Oracle vs Mysql | vivekanandan | Database Support | 1 | 09-04-2007 04:10 AM |
| Why preincrement operator is faster than postincrement? | Sabari | C and C++ Programming | 1 | 07-24-2007 04:42 AM |
| Which is faster for array, while or for or foreach ? | vivekanandan | PHP Programming | 1 | 07-20-2007 07:15 AM |
| A Faster Wi-Fi World Is Coming | vigneshgets | The Lounge | 0 | 05-29-2007 06:16 AM |
| Making Code Faster | pranky | C and C++ Programming | 1 | 03-02-2007 12:17 AM |