0 votes 0 votes main() { int x=1,y=0,z=5; int a=x&&y&&z++; printf("%d",z); } amit166 asked Nov 20, 2018 edited Nov 20, 2018 by Mk Utkarsh amit166 509 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Shaik Masthan commented Nov 20, 2018 reply Follow Share Then z++ executed ===> output is 6 0 votes 0 votes amit166 commented Nov 21, 2018 reply Follow Share but ++ has higher priority then && operater 0 votes 0 votes Shaik Masthan commented Nov 21, 2018 reply Follow Share check this https://gateoverflow.in/215178/c-language-output 0 votes 0 votes Please log in or register to add a comment.
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 manojeve answered Nov 20, 2018 manojeve comment Share Follow See 1 comment See all 1 1 comment reply srestha commented Nov 20, 2018 reply Follow Share due to short circuit rule second operand won't be evaluated, as 1st operand returning 0 So, z++ will even not evaluated 0 votes 0 votes Please log in or register to add a comment.