首页 > C 语言有哪些鲜为人用的技巧?

C 语言有哪些鲜为人用的技巧?

趋向符 -->

#include <stdio.h>

int main(int argc, char** argv) {
  int x = 10;
  while (x --> 0) {
    printf("%d ", x);
  }
  return 0;
}

打印结果

9 8 7 6 5 4 3 2 1 0

快速趋向符 <---

#include <stdio.h>

int main(void)
{
    int x = 10;
    while (0 <---- x) {
        printf("%d ", x);
    }
    return 0;
}

打印结果

8 6 4 2

类似这样的,C 语言还有哪些鲜少用到、狂拽炫酷的技巧?


类似这样的抖机灵么。。。
还鲜少用到,论空格位置的重要性


http://www.zhihu.com/question/27417946

【热门文章】
【热门文章】