#include
int main()
{ int v;
scanf("%d",&v);;
printf("%d\n",(++v*++v+(++(++v))));
return 0;
}
when I execute the above lines say v=3 i get output 37,now I can’t understand how this is evaluated?
#include
int main()
{ int v;
scanf("%d",&v);;
printf("%d\n",(++v*++v+(++(++v))));
return 0;
}
when I execute the above lines say v=3 i get output 37,now I can’t understand how this is evaluated?
Let’s substitute v with n as I like the latter (no pun intended) more. Your kind of magic expression can be calculated as: (n + 1) * (n + 2) + (n + 4). Just substitute step by step from left to right.