//inline.cpp
#include <stdio.h>

//single line pre-processor macro
#define MIN(a,b)	((a<b) ? a : b)

//multi-line pre-processor macro
#define MAX(a,b)\
   if (a > b)	\
	printf("%d",a);	\
   else \
	printf("%d",b);

//single line inline function
inline int min(int a, int b)	{ return (a<b) ? a : b;	}

//multi-line inline function offering simplicity and functionality
//		of a normal function
inline int max(int a, int b)	{
   if (a>b)
	return a;
   else
	return b;
}


main()	{
   int i=5, j=7;
   printf("smaller=%d,",min(i,j));
   printf("smaller=%d\n",MIN(i,j));

   printf("larger=%d,",max(i,j));
   printf("larger=");	MAX(i,j);	printf("\n");
}
/*output**
smaller=5,smaller=5
larger=7,larger=7
*********/
//end inline.cpp

