Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I get 12 when I do it in my head, but now I wanna run this real quick to see if this is some kind of trick question I haven't seen before
-
12. Either this is homework or an interview question... Because if you see this in real code, you need to maim whomever wrote it.
-
Eraborn1658yI think it's 12 because of the pre-increment(I don't know if that's how to say it in English), it increments i and then compares it with 5, so on the first iteration i will be 3, so f will be 3, and on the next, i will be 4, making f to equal 12
Related Rants
question to Java Devs 😂😂😂
undefined
java