Consider:
#include "stdio.h"
int main()
{
int a=3, b=4, c=5;
printf("%d %d %d\n", (a, b, c));
}
And the result is:
5 2280760 2281472
What is the explanation?
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.
You have caused an undefined behavior:
This –
(a,b,c)is evaluated as the last parameter, e.g.c, so the first printed number is 5 (c = 5) the other two are uninitialized parameters.