0

I dont really know specifically what im searching for, which is why i haven't just found this via searching the web. Have you guys come accross or know of any sort of quiz questions like where it gives you a for loop which isn't in the normal format and then asks you what would x be? or how many times will this println?

Just wanna get some exam practise. Thank you.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by dongbv
0

I personally found use of pre/post ++/-- operators combined with self addition / substraction quite frustrating.
E.g.

int i = 0;
		for(; i < 10; i++) {
		     i -= i++ - --i;
		     //OR try this: i += ++i + i--;
		     System.out.println("Hello World!") ;
		}

Q = how many times would you hello the world?

Edited by thekashyap: n/a

0

Haha yeah thats what i meant mate, couldnt really describe it, do you have any links to these kind of questions en masse? lol that question you posted is bloody evil. Without compiling it I'm guessin it would print hello world 10 times beccause the sum is a double negative and so i iterates as ++1 each time? that right m8?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.