0 votes 0 votes Given $i= 0, j = 1, k = - 1, x = 0.5, y = 0.0$ What is the output of given $‘C’$ expression? x * 3 & & 3 || j | k $-1$ $0$ $1$ $2$ Programming and DS ugcnetcse-aug2016-paper2 programming-in-c + – makhdoom ghaya asked Sep 24, 2016 recategorized May 23, 2020 makhdoom ghaya 2.1k views answer comment Share Follow See 1 comment See all 1 1 comment reply dd commented Sep 24, 2016 reply Follow Share $( \ ( \ ( \ x*3 \ ) \ \&\& \ 3 \ ) \ || \ ( \ j \ | \ k\ ) \ )$ ans = 1 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes According to "C Precedence table " http://www.difranco.net/compsci/C_Operator_Precedence_Table.htm your code printf("%d",x *3&&3||j|k); will be simplified to printf("%d",(((x *3)&&3)||(j|k))); More simplified to following steps$\Rightarrow$ $\Rightarrow$(x*3)&&3 || j | k $\Rightarrow$0&&3 || (j | k) $\Rightarrow$0&&3 || 1 $\Rightarrow$(0&&3) || 1 $\Rightarrow$ 0||1 $\Rightarrow$1 Answer 1 sourav. answered Sep 24, 2016 sourav. comment Share Follow See all 0 reply Please log in or register to add a comment.