#include
#define FUDGE(k) k*3.14159
#define PR(a) printf("a= %d\t",(int)(a))
#define PRINT(a) PR(a); putchar('\n')
#define PRINT2(a,b) PR(a); PRINT(b)
#define PRINT3(a,b,c) PR(a); PRINT2(b,c)
#define MAX(a,b) (a<b ? b : a)
main()
{
{
int x=2;
PRINT( xFUDGE(2) );
/ (Preprocessor 1.1) */
}
{
int cel;
for( cel=0; cel<=100; cel+=50 )
PRINT2( cel, 9./5*cel+32 );
/* (Preprocessor 1.2) */
}
{
int x=1, y=2;
PRINT3( MAX(x++,y),x,y );
PRINT3( MAX(++x,y),x,y );
/* (Preprocessor 1.3) */
}
}
a= 12
a= 0 a= 50 a= 100 a= 302
a= 2 a= 2 a= 2
a= 4 a= 4 a= 2
#include
#define FUDGE(k) k*3.14159
#define PR(a) printf(#a"= %d\t",(int)(a))
#define PRINT(a) PR(a); putchar('\n')
#define PRINT2(a,b) PR(a); PRINT(b)
#define PRINT3(a,b,c) PR(a); PRINT2(b,c)
#define MAX(a,b) (a<b ? b : a)
void main(void)
{
{
int x=2;
PRINT( xFUDGE(2) );
/ (Preprocessor 1.1) */
}
{
int cel;
for( cel=0; cel<=100; cel+=50 )
PRINT2( cel, 9./5*cel+32 );
/* (Preprocessor 1.2) */
}
{
int x=1, y=2;
PRINT3( MAX(x++,y),x,y );
PRINT3( MAX(++x,y),x,y );
/* (Preprocessor 1.3) */
}
}
x23.14159= 12
cel= 0 cel= 50 cel= 100 9./5*cel+32= 302
(x++<y ? y : x++)= 2 x= 2 y= 2
(++x<y ? y : ++x)= 4 x= 4 y= 2