P
plmanikandan
Hi,
I am have basic doubt in && operator
for example
what happens when we manipulate negative value and postive value using
'AND' operation
void main()
int j=-10,int k=11,c=0;
c=j++ && k++;
printf("j=%d\nk=%d\nc=%d\n",j,k,c);
return 0;
}
output of the above program is
j=-9
k=12
c=1
when the program run j is incremented to -9 and k is incremented to
12.
when we '&&' with false(i.e negative value) and true(i.e positive
value) output will be false(i.e c=0).but the above program yields
c=1.Please explain the details
Regards,
Mani
I am have basic doubt in && operator
for example
what happens when we manipulate negative value and postive value using
'AND' operation
void main()
int j=-10,int k=11,c=0;
c=j++ && k++;
printf("j=%d\nk=%d\nc=%d\n",j,k,c);
return 0;
}
output of the above program is
j=-9
k=12
c=1
when the program run j is incremented to -9 and k is incremented to
12.
when we '&&' with false(i.e negative value) and true(i.e positive
value) output will be false(i.e c=0).but the above program yields
c=1.Please explain the details
Regards,
Mani