代码

#include        <errno.h>
#include        <math.h>
#include        <stdio.h>
#include        <stdlib.h>
#include        <string.h>

#define ADD(x, y) x + y
#define MUL(x, y) x * y
/*
 * ===  FUNCTION  ======================================================================
 *         Name:  main
 *  Description:  main function
 * =====================================================================================
 */
        int
main ( int argc, char *argv[] )
{
   int a= 2, b = 3;
   printf ("\nProgram %d\n\n", MUL(ADD(a, b), 5) );  //被转换成2 + 3 * 5 注意 没有括号 故结果为17
   return EXIT_SUCCESS;
}               /* ----------  end of function main  ---------- */

 

output:

 program 17

相关文章:

  • 2022-12-23
  • 2021-05-03
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案