Im trying to pass a string like "Hello World" into a a function that looks at each character and prints it (as a base line function for something else) I looked up how to do so and read this post pass char array as argument and while it worked great for one word strings, I can't get it working for two word strings, what can I do to get it working?
#include <stdio.h>
void printer(char *string);
char string[11];
int main(){
  scanf("%s", string);
  printer(string);
  return 0;
}
void printer(char *words) {
  for (int i = 0; i < 51; i++) {
    printf("%c", words[i]);
  }
}
 
     
    