C > Miscellaneous
Macro to substitude values etc
Macro to substitude values etc #include
#define swap(a, b) a ^= b ^= a ^= b; int main(void) { char one = 'a', two = 'b'; /* one = a, two = 'b' */ printf("before : %c %c\n", one, two); swap(one, two); /* one = 'b', two = a */ printf("after : %c %c\n", one, two); return 0; }
C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting