home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************
- * CH07_06.C Directives et macros *
- * NΘcessitΘ de parenthΦses et effets de bord *
- *********************************************************************/
-
- #include<stdio.h>
-
- #define Produit1( x, y) ( x* x + y* y)
- #define Produit2( x, y) ( (x)*(x) + (y)*(y))
-
- main( void)
- {
- int a= 2, b= 3;
-
- printf(" Produit1: %d\t Produit2: %d",
- Produit1( a+ 1, b+ 1), Produit2( a+ 1, b+ 1));
-
- printf("\n\n Produit2: %d\t Produit2: %d",
- Produit2( a+ 1, b+ 1), Produit2( a++, b++));
- }
-
- /*
- Produit1= 12 Produit2= 25
-
- Produit2= 61 Produit2= 18 */