0 votes 0 votes 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$? $*$ and $=$ $*$ and $+$ $+$ and $*$ $+$ and $=$ Programming in C tbb-programming-2 + – Bikram asked May 14, 2017 • edited Aug 19, 2019 by Counsellor Bikram 274 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply junaid ahmad commented Oct 17, 2017 i edited by junaid ahmad Oct 17, 2017 reply Follow Share @ 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 1 votes 1 votes Shahazad commented Oct 2, 2018 reply Follow Share Because of the bracket the precedence of = inside () is higher than + operator in this case . I hope I cleared the doubt. Correct me if wrong. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Option D) is correct $k=1+(j=i) $ Since $i=1$, and precedence of $()$ is greater than $+$ $k=1+1=2$ Ashwani Kumar 2 answered Oct 11, 2019 Ashwani Kumar 2 comment Share Follow See all 0 reply Please log in or register to add a comment.