为什么这段代码不返回预期的连接字符串,而是2?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const char * meh() {
char meh1[32] = "This ";
char meh2[32] = "should work :)";
return strcat(meh1, meh2);
}
int main() {
printf(meh());
return 0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
208 次 |
| 最近记录: |