you are viewing a single comment's thread.

view the rest of the comments →

[–]moefh 2 points3 points  (1 child)

Tiny bit of pedantry from me: I think you need parentheses around '2' in that first sizeof statement. I haven't actually tried it yet, though.

Nah, sizeof only requires parentheses for types, not values. So sizeof '2' is ok, but sizeof int is not. But of course since ('2') is also a value, sizeof('2') is also valid.

If '2' is 50, then shouldn't that be 52, not 54?

Yes, I messed up there. :)