I am trying to access all elements of this preinitialized char pointer in 'c'. Here is the code:
#include <stdio.h>
#include <stdlib.h>
void main()
{
char **s="Hello";
printf("%c",*(*&s+1));
}
This code should output "e", but doesn't. What am I doing wrong?
Also, how do I access all elements one by one?
"Hello"individually with the%cspecifier, you'll need a loop.gcc, I use-Wall -Wextra -pedantic. This would have found the problem.