相关疑难解决方法(0)

C预处理器的工作

下面的代码如何工作,换句话说C预处理器的算法是什么?这适用于所有编译器吗?

#include <stdio.h>

#define b a
#define a 170


int main() {
  printf("%i", b);
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

c c-preprocessor

4
推荐指数
2
解决办法
1216
查看次数

这个 C 代码的输出是 49 但有人可以解释我怎么做吗?

#include <stdio.h>

#define CUBE(x) (x * x * x)

int main() {
    printf("%d", CUBE(4+5));
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c c-preprocessor

1
推荐指数
2
解决办法
158
查看次数

标签 统计

c ×2

c-preprocessor ×2