主页
C 语言
C 用户输入
demo_user_input_str_c2
运行 ❯
×
更改方向
保存代码
更改主题
#include
int main() { // Create a string char fullName[30]; // Ask the user to input some text (full name) printf("Type your full name and press enter: \n"); // Get the text fgets(fullName, sizeof(fullName), stdin); // Output the text printf("Hello %s", fullName); return 0; }
Type your full name and press enter: