Are They Same(First Look "Are They Same 1")2? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Are They Same(First Look "Are They Same 1")2?

just character numbers. Don't say your method is wrong. Because I am using this method. For example: char *const ptr[4]={{"hey"},{"what"},{"is"},{"happening"}};

7th Dec 2017, 6:25 PM
Yusuf
Yusuf - avatar
1 Answer
+ 11
According to my understanding, this should not work. You are declaring a array of size 4 which stores constant character pointers. While "string" is a string literal stored somewhere in the memory, I doubt doing {"string"} would return the memory address of it.
7th Dec 2017, 7:21 PM
Hatsy Rei
Hatsy Rei - avatar