C++ pointers char -


what happens after running code?

  char* c= "abc";   void* p= &c;   printf("%s %s", *(char**) p, *(char*) p); 

so c points string , p too. don't * do. can explain me?

the second argument in printf line causes problem, because interpret content of p string, rather pointer string. printf line be:

printf("%s %c", *(char**)p, *c); 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -