zoukankan      html  css  js  c++  java
  • 类函数宏

    /*
     ============================================================================
     Name        : kinson.c
     Author      : 
     Version     :
     Copyright   : Your copyright notice
     Description : Hello World in C, Ansi-style
     ============================================================================
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    
    #define ok(x) x*x
    #define okk(x) (x)*(x)
    
    int main(void)
    {
        int a = 2;
        int b = 3;
        int c = ok(a+b);//6+5=11
        //int c = a+b*a+b;
        int d = okk(a+b);//
        //int d = (a+b)*(a+b)
        printf("ok(a+b)= a+b*a+b=%d
    ",c);
        printf("okk(a+b)= (a+b)*(a+b)=%d
    ",d);//5*5=25
        return EXIT_SUCCESS;
    }

     

  • 相关阅读:
    第二次作业。。
    第一次随笔作业
    第一次作业
    第4次随笔
    第3次随笔
    第2次作业
    第一次随笔
    我的第一次随笔
    iforums
    第四次作业
  • 原文地址:https://www.cnblogs.com/kinson/p/7592540.html
Copyright © 2011-2022 走看看