Program executes after for loop - C
Here is my problem. Immediately after I type in some input and hit enter the program executes. And I some how figured out that the problem was due to the for loop which I was using. Here is the code.

    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    
    main(){
           
           
     char myString[100]; 
     char myChar = myString[6];
     int i;
     
     for(i=0; i<=100; i++){
        scanf("%s", myString[i]);
     }
     
     printf("%c\n", myChar); 
     system("pause");
            
    }
Program executes after for loop - C
===

Here is my problem. Immediately after I type in some input and hit enter the program executes. And I some how figured out that the problem was due to the for loop which I was using. Here is the code.

    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    
    main(){
           
           
     char myString[100]; 
     char myChar = myString[6];
     int i;
     
     for(i=0; i<=100; i++){
        scanf("%s", myString[i]);
     }
     
     printf("%c\n", myChar); 
     system("pause");
            
    }