By using argc and argv after the int main(), we can easily write code to iterate through strings and sub chars as we want. I am wondering if we can do the same thing by prompting user for input; and access each individual string from the user input?
string s = GetString();
char * a;
a = strtok (s, " ");
while (a != NULL) /*when all tokens are called, the final strtok resturns NULL, so that the loop can be terminated*/
{
for (int i = 0; i < 1; i++)
{
printf ("%c", toupper (a[0]));
}
a = strtok (NULL, " "); /*returning pointer (NULL token n+1), n represents how many times the loop is called*/