it is a silly Q for most of u – i know – but i one of the beginner here, and I can not understand why the output in here are 12 what does this (x--) do to the result ?
int x, y;
x = 7;
x-- ;
y = x * 2;
x = 3;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine 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.
Please briefly explain why you feel this user should be reported.
Just a cautionary note, sometimes the pre and post increment operators can have unexpected results
Why does this go into an infinite loop?
and what does:
do
Read here:
http://www.angelikalanger.com/Articles/VSJ/SequencePoints/SequencePoints.html