the second anwser in 4.29
Author: woshiZSCreated May 11, 2020Updated Jul 30, 2023
I have written the according code, it shows 1 when cout <<sizeof(p)/sizeof(*p)<<endl;.
My os is windows , IDE is visual studio 2019 . Does the word undefined in your anwser means the output depends on the compiler or what?
Source: Mooophy/Cpp-Primer