Why would this work? - and it does! any thoughts?
#include<stdio. h>
void init(char **str){ *str="Awesome"; }
main(){
char * str;
printf("address : %d\n", str);
init(&str);
printf("address : %d\n", str);
printf("string: \'%s\' has %d characters \n", str,strlen(str) );
}
#include<stdio. h>
void init(char **str){ *str="Awesome"; }
main(){
char * str;
printf("address : %d\n", str);
init(&str);
printf("address : %d\n", str);
printf("string: \'%s\' has %d characters \n", str,strlen(str) );
}
Comment