fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. char names[5][51];
  6. printf("Enter the names: ");
  7. for (int x = 0; x <5; x++) {
  8. printf("\nPrintTest 1");
  9. scanf("%50s", names[x]);
  10. printf("\nPrintTest 2");
  11. }
  12. printf("\nPrintTest 3");
  13. for (int x = 0; x < 5; x++) {
  14. printf("\nPrintTest 4");
  15. printf("Name: %s", names[x]);
  16. printf("\nPrintTest 5");
  17. }
  18. printf("\nDone.\n");
  19.  
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 2164KB
stdin
quick
brown
fox
jumps
over
stdout
Enter the names: 
PrintTest 1
PrintTest 2
PrintTest 1
PrintTest 2
PrintTest 1
PrintTest 2
PrintTest 1
PrintTest 2
PrintTest 1
PrintTest 2
PrintTest 3
PrintTest 4Name: quick
PrintTest 5
PrintTest 4Name: brown
PrintTest 5
PrintTest 4Name: fox
PrintTest 5
PrintTest 4Name: jumps
PrintTest 5
PrintTest 4Name: over
PrintTest 5
Done.