/* this function is better version of fgets input: the string and the len of the string output: NONE */ void myFgets(char str[], int n) { fgets(str, n, stdin); str[strcspn(str, "\n")] = 0; }