//AN IMPLEMENTATION TO UNDERSTAND THE CHECKING WAY OF LOGICAL AND && LOGICAL OR OPERATORS//
//LOGICAL AND---
//0 0------0
//0 1----- 0
//1 0----- 0
//1 1----- 1
//LOGICAL OR---
//0 0-----0
//0 1-----1
//1 0-----1
//1 1-----1
#include<stdio.h>
int main()
{
int i=0,j=0;
if(i && j++)//BCZ...IN LOGICAL AND(&&)..IT WILL CHECK THE 1ST CONDITION IF IT IS TRUE ..THEN IT WILL CHECK THE 2ND CONDITION...OTHERWISE ,...IF 1ST CONDITION IS FALSE..IT WILL NOT MOVE TO CHECK THE 2ND CONDITION...SO VALUE OF J IS NOT INCREMENTED AFTER OPERATION EITHER IT WOULD BE PRE-INCREMENT OR IT IS POST-INCREMENT..//
printf("iiiiiii=%d j=%d\n",i,++j);//NOT PRINTED DUE TO FALSE CONDITION//
printf("i=%d j=%d \n",i,j);//VALUE OF J IS NOT INCREMENTED ...//i=0 j=0 will be printed
if(i || j++)//THIS CONDITION IS AGAIN FALSE BCZ..IF LOGICAL OR WOULD GET 1ST CONDITION TRUE ...THEN IT WILL NOT MOVE TO 2ND CONDITION TO CHECK & DECLARE ALL THE CONDITION TRUE ..//
//BUT IF IN THE CASE OF OR,,,,IST CONDITION IS FALSE ..IT WILL MOVE TO 2ND CONDITION TO CHECK IF IT IS TRUE OR FALSE...BCZ IT IS THE CASE OF POST-INCREMENT..SO IT HAS NOT INCREMENTED THE VALUE OF j 1ST ...
//IT HAS DONE IST OPERATION IN WHICH j=0 CONDITION IS CHECKED & CONDITION BECOME FALSE....THEN ON J IS INCREMENTED//
printf("iiii=%d j=%d\n",i,++j);
else
printf("i=%d j=%d",i,++j);//IN PRINTING THIS i=0 & J WAS BECOME J=1 AFTER CONDITION MADE FALSE J WAS INCREMENTED...NOW J IS AGAIN ++MENTED ..J BECOME 2