Why I cannot print the char d in the below code. I get segmentation fault
this is the problem --> printf("\n %s", d); could you please help me how to print if that is possible?Code:#include <stdlib.h> #include <stdio.h> main(){ char a[]="Cool"; char b[]="things"; char *c; c=a; char d; d=*(c+2); printf("%s", c); printf("\n %p", c); printf("\n %p", ++*c); printf("\n %p", *(c+2)); printf("\n %p", d); printf("\n %s", d); }