I have this quiz for a programming class. And I was wanting some feedback on the answers that I have. I'll list my answers to the questions, and provide a link to the quiz.
Q1. int x=0, y=1;
Q2. I was a bit confused by this one, so do the problem too and see if you think I did it right.
Answers: x = 11
y = 3
z = 4
Q3. I was semi confused by this one too. This is the one I think that I did wrong.
Answer: int x=0;
n = x
http://i.imgur.com/I72uX.png
Thanks for the feedback and help!
How did you get 12 for z?
AHHHHHHHHHHH NOOB MISTAKE! Order of precedence! Divide first, THEN add. z = 3, y = 3 so z / y = 1 then 11 + 1 would equal z. THANK YOU!
Q1. int x=0, y=1;
Q2. I was a bit confused by this one, so do the problem too and see if you think I did it right.
Answers: x = 11
y = 3
z = 4
Q3. I was semi confused by this one too. This is the one I think that I did wrong.
Answer: int x=0;
n = x
http://i.imgur.com/I72uX.png
Thanks for the feedback and help!
How did you get 12 for z?
AHHHHHHHHHHH NOOB MISTAKE! Order of precedence! Divide first, THEN add. z = 3, y = 3 so z / y = 1 then 11 + 1 would equal z. THANK YOU!