1
0

08-char-string.c 241 B

12345678910111213
  1. #include <stdio.h>
  2. int main() {
  3. char name[20] = "John Doe";
  4. printf("Name: %s\n", name);
  5. char message[50];
  6. printf("Enter a message: ");
  7. fgets(message, sizeof(message), stdin);
  8. printf("You entered: %s\n", message);
  9. return 0;
  10. }