#define MIN(A,B) ((A) <= (B) ? (A) : (B))
this is the macro , I was asked what’s the side effect if I used the following :
least = MIN(*p++, b);
Note: This was embedded c question
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.
It evaluates
p++twice. Also, since the first evaluation changesp, the second time around it will point to a different element. So the returned value will be*(initialp + 1)orb.You should try it yourself.