Mega Code Archive

 
Categories / C / Code Snippets
 

Define small function in macro

#define CUBE(a) a*a*a #include <stdio.h> main () { int k = 13; int j = 0; j = CUBE(k); // j = k*k*k printf ("Cube value of j is %d\n", j); }