What is the difference between Post increament and pre increament function in c++ ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our W3Make Forum to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Post-increment and pre-increment are easy topics. You need to know the difference between the words. The word ‘post’ basically means ‘after’ which means while trying to iterate the numbers or data, it will first perform the condition(if performing loops), and only then will it increase the value of the data accordingly whereas in pre-increment, the condition is applied after the increment of the data.
Synatx:
Pre-Increment:
a= ++x;
Post-Increment:
a= x+++;