Recent questions tagged short-circuit-rule

1 votes
2 answers
1
int main() { int i=-1, j=-1,k=0,l=2,m; m= i++ && j++ && k++ || l++ ; printf("%d %d %d %d %d", i,j,k,l,m); return 0; }
7 votes
2 answers
2
What will be the outout of the following code?#include <stdio.h int main() { int a = 1, b = 2; int c = a++ || b++; printf("%d %d %d", a, b, c); }1 2 12 3 12 2 12 2 0
4 votes
1 answer
3
#include<stdio.h int main() { int a=1, b; b = ++a || ++a; printf("%d %d", a, b); }Undefined Value3 12 12 2
To see more, click for the full list of questions or popular tags.