Read the following code fragment:
#include <stdio.h> main() { int i=1,j; int k= 1__ (j ___ i) ; printf("%d%d%d\n", i,j,k); }
What operators are needed in the blanks to print $1 \ 1 \ 2$?
@ Bikram sir, according to the answer this is the expression K=1 + j = i, here + is an binary operator which is having more precedence than assignment operator so j must take any garbage value not
Please check sir is it correct ?
BTW this program is not even working it is throwing lvalued error
check :https://ideone.com/eRRr9g
Option D) is correct
$k=1+(j=i) $
Since $i=1$, and precedence of $()$ is greater than $+$
$k=1+1=2$
64.3k questions
77.9k answers
244k comments
80.0k users