zoukankan      html  css  js  c++  java
  • 测试intel 8.0

    #include <stdio.h>
    #include <stdlib.h>

    #define myMax(...) Max(__VA_ARGS__)


    int Max(int a,int b)
    {
     return (a>b? a :b);
    }

    int f(char str[static restrict 20],char ptr[static restrict 20])
    {
     str[0]=ptr[2];
     str[1]=ptr[3];

     printf("%s , in %s called ",str,__func__);
     return 0;
    }

    struct my
    {
     int a;
     int b;
     float fa[];
    }ot={.b=3,.a=5};


    int main(int argc, char** argv)
    {
     struct my *p;

     p= (struct my*)malloc(sizeof(struct my) + sizeof(float) * 2);

        p->a=5;
        p->b=6;
        p->fa[0]=1.2;
        p->fa[1]=2.1;
      
     
     int n=((int)+(20));

     
     int ar[10]={0};
     int i;
     for(i=0;i<=10;i++)
     {
      ar[i]=1;
      printf("--%d",i);
        }

    // scanf("%d",&n);
     int a[n];

     printf("VLA a[] lenght=%d\n",sizeof(a));
     
     printf("struct my have a=%d, b=%d, fa[0]=%f fa[1]=%f\n ot.a=%d,ot.b=%d",p->a,p->b,p->fa[0],p->fa[1],ot.a,\
     ot.b);
     
     printf("\nMax = %d ",myMax(p->a,p->b));

     //char b[10]={[0]='h',[1]='e',[4]='o'};

     char b[5];
     b[2]='l';
     b[3]='l';
     
     f(b,&b[1]);
     return 0;
     
     
    }

  • 相关阅读:
    AD 快捷键
    AD PCB 错误检查
    AD 在 PCB导出封装库
    AD PCB 机械层 画板步骤
    不同频率对PCB材料的要求
    RF 天线长度,通信距离估算
    RF硬件检查注意事项
    影响RSSI的因素
    阅读与思考
    面向对象特性分析
  • 原文地址:https://www.cnblogs.com/junnyfeng/p/197013.html
Copyright © 2011-2022 走看看