在这个C编程难题中,您需要合并两个数字。您不能使用任何算术,字符串或其他函数。
所以在这个C难题中-
Input : 12 , 54 Output : 1254
解决此C编程难题的最佳方法是使用令牌粘贴运算符定义。
使用此##令牌粘贴运算符定义宏可为您提供合并值。该运算符合并传递给它的令牌。
#include <stdio.h>
#define merge(a, b) b##a
int main(void) {
   printf("%d ", merge(432 ,23));
   return 0;
}输出结果
23432