So people told me that I can't use an array of strings and try to output just the first character of every single string like in this code for example:
#include <stdio.h>
#include <cs50.h>
#include <string.h>
int main(void)
{
string s[] = GetString();
for(int i = 0, k = strlen(s); i < k; i++)
{
for(int n = 0; n <= i; n++)
{
int j = 0;
if(s[i][j] >= 'a' && s[i][j] <= 'z')
{
printf("%c\n", s[i][j]) - ('a' - 'A');
}
else
{
printf("%c\n", s[i][j])
}
}
}
}
So, I'm hoping you guys give me a tip on how to type every first letter of every single word given as an input without differentiating every word as a new string and then taking its first char. I know I have to leave the code like this :
string s = GetString();
But then how would I command the programme to type out just the first letter of every new word if the computer doesn't see them as different elements but as a whole forming one big string.