Hello im practicing C language
and i ran into this code and i can't figure out the outputs :(
can u help me please ?
I'm confused in operator precedence.
and What does short circuit evaluation means in c?
when i run this code the output is:
000 and 001
How come this way ? please share ur knowledge with me .
#include<stdio.h>
void main()
{
int a = 0, b = 0, x;
x = 0 && (a = b = 777);
printf("%d %d %d\n", a, b, x);
x = 777 || (a = ++b);
printf("%d %d %d\n", a, b, x);
}
Thanks much...