Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Weeding out

Name: Anonymous 2009-08-17 3:54

Read the following statements and tick the box next to the correct answer.


int a = 10;
int b = 20;
a = b;


The new values of a and b are:
[ ] a = 20  b = 0
[ ] a = 20  b = 20
[ ] a = 0   b = 10
[ ] a = 10  b = 10
[ ] a = 30  b = 20
[ ] a = 30  b = 0
[ ] a = 10  b = 30
[ ] a = 0   b = 30
[ ] a = 10  b = 20
[ ] a = 20  b = 10

Name: Anonymous 2009-08-17 3:55


[ ] a = 20  b = 0
[x] a = 20  b = 20
[ ] a = 0   b = 10
[ ] a = 10  b = 10
[ ] a = 30  b = 20
[ ] a = 30  b = 0
[ ] a = 10  b = 30
[ ] a = 0   b = 30
[ ] a = 10  b = 20
[ ] a = 20  b = 10

Name: Anonymous 2009-08-17 3:56

[x] a = 20  b = 0
[x] a = 20  b = 20
[x] a = 0   b = 10
[x] a = 10  b = 10
[x] a = 30  b = 20
[x] a = 30  b = 0
[x] a = 10  b = 30
[x] a = 0   b = 30
[x] a = 10  b = 20
[x] a = 20  b = 10

Name: Anonymous 2009-08-17 3:57

>>3

I think we've got a real programmer on our hands.

Name: Anonymous 2009-08-17 4:00


The new values of a and b are:
[ ] a = 20  b = 0
[ ] a = 20  b = 20
[ ] a = 0   b = 10
[ ] a = 10  b = 10
[ ] a = 30  b = 20
[ ] a = 30  b = 0
[ ] a = 10  b = 30
[ ] a = 0   b = 30
[ ] a = 10  b = 20
[ ] a = 20  b = 10
[x] False

Name: Anonymous 2009-08-17 4:27

>>1:6:0:
    Multiple declarations of `Weed.a'
    Decla*** Exception: stack overflow

Name: Anonymous 2009-08-17 5:41

Holy shit, I laughed out loud for no reason at all.

Name: Anonymous 2009-08-17 5:50

[࿊] a = 20  b = 0
[࿊] a = 20  b = 20
[࿊] a = 0   b = 10
[࿊] a = 10  b = 10
[࿊] a = 30  b = 20
[࿊] a = 30  b = 0
[࿊] a = 10  b = 30
[࿊] a = 0   b = 30
[࿊] a = 10  b = 20
[࿊] a = 20  b = 10

Name: Anonymous 2009-08-17 6:57

What the hell is going on here.

Name: Anonymous 2009-08-17 17:20

Bus error.
Core dumped.

Name: Anonymous 2009-08-17 18:35

>>9
The OP saw the FizzBuzz thread and thought it would be clever to copy/paste another beginner's exercise he saw on Reddit.

Don't change these.
Name: Email:
Entire Thread Thread List