I wrote the following code:
char arrayD[] = "asdf";
char *arraypointer = &arrayD;
while(*arraypointer != '\0'){
printf("%s \n", arraypointer+1);
arraypointer++;
}
I tried %d %c to print each character. However, with %c I get "? ? ? ?", with %s I get "sdf sd f ". etc. What am I missing here?