I'm having a hard time coding understanding the format of the specifier and string functions.
My aim is to use %[]
to readin all characters and spaces and then use the strcpy function followed by the strcat function.
So far i've managed to enter individual characters and print them out, excluding spaces.
here's the code so far;
int main(int argc, char** argv) {
char words[30];
int loops;
printf("How many letters would you like to enter? - ");
scanf("%d",&loops);
for(int i=0;i<loops;i++){
printf("Provide some text as input:");
scanf("%s", &words[i]);
}
printf("%d", strlen(words));
printf("%s",&words);
return (EXIT_SUCCESS);
}