My initialize code glitches when i compile it. It asks me for my name and then it prints it out without initializing it. (its also worth pointing out that it capitilized the first letter of my first and last name and doesnt 'initialize' it)
#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, string argv[])
{
printf("Hello, what is your name?");
string s = GetString();
for (int i = 0 ; s[i] != '\0' ; ++i)
{
if (i == 0 || s[i-1] == ' ')
printf("%c", toupper(s[i]));
else
printf("%c", s[i]);
}
}