面试题答案
一键面试#include <stdio.h>
// 定义宏,将参数转换为字符串
#define TO_STRING(x) #x
// 定义函数用于展示转换结果
void show_string(const char *str) {
printf("转换后的字符串: %s\n", str);
}
int main() {
int num = 10;
// 调用函数展示转换结果
show_string(TO_STRING(num));
return 0;
}