I want to get the elements of an array of characters, but no success at all, the problem is that I only get the first and last element and nothing more, my code is:
Other answers have told you why it plain doesn't work, I'm wonder why you're not just iterating until the null terminator?
void getcharacters(char *cad) { char *i; for (i = cad; *i; i++) { printf("%c\n",*i); } }