#include <stdio.h>
int main() {
char str[] = "Hello, World!";
printf("%s\n", str);
return 0;
}
#include <stdio.h>
int main() {
char str[] = "Hello, World!";
puts(str);
return 0;
}
#include <stdio.h>
int main() {
char str[] = "Hello, World!";
FILE *file = fopen("output.txt", "w");
fputs(str, file);
fclose(file);
return 0;
}
#include <stdio.h>
int main() {
char str[] = "Hello, World!";
int i = 0;
while (str[i] != '\0') {
putchar(str[i]);
i++;
}
putchar('\n');
return 0;
}
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:C语言中输出字符串的方法有哪些