[1+1=2]
OneAndOneIs2

Wed, Jun 06, 2007

[Link][Icon]A sig. I rather liked

But only programmers will get it.

C++ /* Makes C bigger but returns the old value */

[Smiley]

3 comments • Categories: Omni, Programming

Comments:

Comment from: hari [Member] Email · http://hari.literaryforums.org
Clever... there are a lot of variations on similar jokes I've seen around the internet. :=P
PermalinkPermalink 06/06/07 @ 12:23
Comment from: alison [Member] · http://www.creativehedghog.com
and I thought I was clever when I understood that C++ meant C at the next iteration...

admit I don't get this one... :)
PermalinkPermalink 06/06/07 @ 13:06
Comment from: oneandoneis2 [Member] · http://geekblog.oneandoneis2.org/
Look at it this way:

#include <stdio.h>

int main()
{
int C = 0;
printf("C equals %d\n", C++);
printf("C now equals %d\n", C);
return 0;
}


This will output:
C equals 0
C now equals 1

C++ will return the current value of C and then increment C by one. ++C will increment C by one and THEN return the current value of C.

So in C, "C++" will in fact return the current value of C and then make C larger...
PermalinkPermalink 06/06/07 @ 13:42

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Categories

August 2008
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search

Misc

XML Feeds

What is this?
eXTReMe Tracker

Valid XHTML 1.0 Transitional

Valid CSS!

[Valid RSS feed]

powered by
b2evolution

blank