fork download
  1. #include <stdio.h>
  2.  
  3. char lname [81], fname [81];
  4. int count, id_num;
  5.  
  6. main() {
  7.  
  8. printf("Enter last name, firstname, ID:");
  9.  
  10.  
  11. /* Input the three data items. */
  12.  
  13. count = scanf ("%s%s%d ",lname ,fname,&id_num );
  14.  
  15. /* Display the data. */
  16.  
  17. printf ("%d items entered: %s %s %d\n", count, fname , lname , id_num);
  18. return 0;
  19.  
  20. }
Success #stdin #stdout 0.01s 5280KB
stdin
Murschell Abigail 12345
stdout
Enter last name, firstname, ID:3 items entered: Abigail Murschell 12345