fork download
  1. // Mar 26, 2017
  2. // Eric C. Mattoon
  3. // CMIS Lab 6
  4. // Exercise 4: This will show what happens if more than 100 char are
  5. // entered into an array of 100. Input will be 100 a's
  6. // with the 101st character as Z
  7. #include <stdio.h>
  8. int main(void) {
  9. /* variable definition: */
  10. char StudentName[100];
  11. int students,exams;
  12. // Loop through 1 Students
  13. for (students=0; students <1 ; students++)
  14. {
  15. printf("Enter Student Name \n");
  16. scanf("%s", StudentName);
  17. }
  18. return 0;
  19.  
  20. }
Success #stdin #stdout 0s 9432KB
stdin
a
stdout
Enter Student Name