edited by
509 views
0 votes
0 votes
main()
{
int x=1,y=0,z=5;
int a=x&&y&&z++;
printf("%d",z);
}
edited by

1 Answer

1 votes
1 votes
ans is 5 because (1&&0)&&z++  and (1&&0) =0 then it will not check further so z will not change

Related questions

0 votes
0 votes
1 answer
1
amit166 asked Nov 20, 2018
170 views
int a=10if(i++<10),if(++i<10).,while(i++<10) what is logic behind
0 votes
0 votes
2 answers
2
amit166 asked Jan 3, 2019
559 views
void main() { int i=6; for( i; i; i ) { printf(“%d”,i); } }
0 votes
0 votes
0 answers
3
amit166 asked Dec 28, 2018
276 views
#include <stdio.h>int cou=0;int cal(int a,int b){ int c; cou++; if(b==3) return(a*a*a); else{ c=cal(a,b/3); return(c*c*c); }}int ma...
0 votes
0 votes
1 answer
4
amit166 asked Nov 20, 2018
263 views
#include<stdio.h>int main(){int num=10;do{while(num++ <10);}while(num++ <=11);printf(“%d”,num);}