Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in C language. I got the basics of the program. but i need to be able to do the following : 1. be able to
in C language. I got the basics of the program. but i need to be able to do the following :
1. be able to enter a first and last name
2. only keep the first letter and last letter of the first and last names.
3. remove all the spaces
4. do all things in a loop so it will continue to ask for the user's name over again.
ex:
input: Sandra Lee
output: SaLe
input: they like computer science
output: tylecrse
can you please explain everything so I may build and understand from it, thank you!
8. 9 10 11 12 */ Evoid Remove Spaces (char* name) { const char* d = name; do { while (*d ') { ++d; } } while (*name++ = *d++); 13 14 15 16 17 18 19 20 Fint main() { char name[100]; printf("what is your name? :"); scanf("%s", name); 21 22 23 24 25 int i = strlen(name)-1; RemoveSpaces(name); printf("%c_%c", name[o], name[2]); return 0; 26 27 what is your name? : daniel d2 Process finished with exit code 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started