recategorized
2,104 views
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. $-1$ 
  2. $0$ 
  3. $1$ 
  4. $2$
recategorized

1 Answer

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

Related questions

2 votes
2 votes
1 answer
2
makhdoom ghaya asked Sep 28, 2016
2,795 views
In Data mining, ______ is a method of incremental conceptual clustering.STRINGCOBWEBCORBAOLAD
1 votes
1 votes
1 answer
3
makhdoom ghaya asked Sep 28, 2016
2,400 views
Discovery of cross sales opportunities is called as _____.AssociationVisualizationCorrelationSegmentation
1 votes
1 votes
2 answers
4
makhdoom ghaya asked Sep 28, 2016
4,658 views
In Data mining, classification rules are extracted from _______.DataInformationDecision TreeDatabase