Friday, March 25, 2011

Macro Program

# include "stdio.h"
#define MAX(a, b) a>b ? a:b
int main()
{
int m, n;
m =20+ MAX(2, 3);
n = 2 * MAX(3, 2);
printf("m = %d, n = %d\n", m, n);
return 0;
}

OUTPUT:

m = 2, n = 3
Press any key to continue . . .

No comments:

Post a Comment