Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのコードを試していました:
int main() { char *ch="hello"; printf("%u",&ch); return 0; }
上記のprintf()ステートメントから、65524 私は ch *(65524)ieの住所を持ってい*(&ch)ます。
printf()
65524
*(65524)
*(&ch)
はい、次のことができます。
printf("%d\n", *(unsigned char *) 65524);
アドレスが有効なオブジェクトを指していない場合、未定義の動作が発生しています。