I'm a beginner in C programming so please be nice! I'm trying to solve some practice beginner challenges and the one I'm on at the moment needs me to capture text input. In the brief code below anything will be captured up to the 1st space. after this nothing appears whilst debugging.
I did try the gets instruction 1st but this wouldn't compile even though I'd followed examples online
#include <stdio.h>
#include <string.h>
int main(void) {
char stringcapture[500];
scanf("%s", stringcapture);
LongestWords(stringcapture);
return 0;
}
So I'm trying to pass 'stringcapture' into the longestwords function. However all that gets captured and hence passed is the 1st word up to a space being entered