Code:
#include <stdio.h>
int main()
{
char stem[1];
printf("Type in the infinitive form:\n\n");
scanf("%s", stem);
printf("Present Tense\nInfinitive: %s\n\n", stem);
printf("First Person Singular: %s\n", stem);
printf("Second Person Singular: %s\n", stem);
printf("Third Person Singular: %s\n", stem);
printf("First Person Plural: %s\n", stem);
printf("Second Person Plural: %s\n", stem);
printf("Third Person Plural: %s\n", stem);
printf("Present Passive: %s\n", stem);
printf("Negative Passive: %s\n", stem);
}
I'm trying to make a verb conjugator in C. The user will attribute a value (a verb) to the variable "stem" and I want this variable to be displayed in the printf's with the last 3 letters removed so I can individually add the pronominal endings.
So if the value "abcdefg" is attributed to "stem", I want it to be displayed as just "abcd" in the printf's below the scanf but I got no clue how to do this. This is not a thing apparently:
Code:
printf("First Person Singular: %s\b\b\b", stem);
I'm really in the beginning still so any ideas on how to do this? Thanks.