fork download
  1. #include <stdio.h>
  2.  
  3. char name[40], lname[40];
  4. int age;
  5.  
  6. int main() {
  7. printf("What's your first name? ");
  8. scanf("%39s", name);
  9.  
  10. printf("What's your last name? ");
  11. scanf("%39s", lname);
  12.  
  13. printf("How old are you? ");
  14. scanf("%d", &age);
  15.  
  16. printf("Your name is %s %s.\n", name, lname);
  17. printf("You are %d years old.\n", age);
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5244KB
stdin
Standard input is empty
stdout
What's your first name? What's your last name? How old are you? Your name is  .
You are 0 years old.