The real answer is that any programmer who would write this kind of code should be given the opportunity to work for the competition.
The sequence expression (q=4,r=-12,q) evaluates to 4 (the last element), with the side-effect of assigning r the value -12. So, avg(1,4,-12) = -7/3 = -2.33...
What will be output if you will execute following c code?
a) 1.000000
b) 0.333333
c) -2.333333
d) 1
Questions by lalithakasiraj
Related Answered Questions
Related Open Questions