[prog] C code

Noir acknak_halflife at yahoo.co.uk
Mon May 2 15:11:59 EST 2005


Can anyone help me understand the following C code?
Like, why the output is 4.

#include <stdio.h>
#define SIX    1 + 1
#define NINE   2 + 1 
int main(void)
 {
    printf( "What you get if you multiply six by nine:
%d\n",
                SIX * NINE
                          );
     return 0;
}

Output: What you get if you multiply six by nine: 4

Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the Programming mailing list