I am really new to programming and this is my first question, I would be grateful for either a code, an article where similar problem is explained or even a suggestions on how to proceed because its for my school and I just don't know what to do because I had covid and wasn't able to attend recent classes.
The problem was described in the title so I will just add what some specifications and what I thought of:
- the strings are only words with spaces in between them, nothing else, begins and ends with no spaces
So it has to be like this:
#include <stdio.h>
int main() {
char s[] = "ab bb cc oh hey there dd";
char w[] = "ab cc dd oho hello";
int count = delete_words(s, w);
printf("deleted: %i\nnew_string: %s", count, s);
/*
the printf should print:
deleted: 3
new_string: bb oh hey there
*/
return 0;
}
If you took the time to read all this I thank you.