The answer is A, when the "++" comes after the variable, the value is added after the line or parentheses as in "x++", but when the "++" comes before the variable, the value is added on the fly as in "++y" then inside the condition we had 1 < 2, giving true and printing Hello on the last line as the two variables already had their value added +1, printed on the screen Hello Log 2:2.
Thanks for your comments. They are very helpful !!
upvoted 2 times
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DriftKing
3 months, 3 weeks agoiSnover
1 year, 3 months agoAnKaCode
1 year, 3 months ago