website/_posts/cheri/code/membug.c

13 lines
370 B
C
Raw Normal View History

2022-11-19 11:56:01 +00:00
#include <stdio.h>
int main() {
char my_perfect_string[] = "what a beautiful string"; // so beautiful, I sure hope no-one touches it
char user_name[32];
printf("enter your name: ");
fgets(user_name, 1000, stdin); // get user's name from stdin
printf("hello %s", user_name);
printf("my_perfect_string: %s\n", my_perfect_string);
return 0;
}