I seem to be getting the correct output when my string is 10 characters or less, but once that character number increases upon input, I compile the program and the loop seems to shut down and output only the correct initials for up to 10 characters. (and on a separate note: I'm not able to add a jpg or tiff image to this post. any hints?)
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
int main (int argc, char *argv[])
{
char *s = GetString();
int i = 0;
printf("%c", toupper(s[0]));
int n = strlen(argv[i]);
while (i < n)
{
i++;
if (s[i] == ' ')
{
printf("%c", toupper(s[i+1]));
}
}
printf("\n");
}