https://en.cppreference.com/w/c/language/sizeof
1. sizeof( type ) Returns the size, in bytes, of the object representation of type
2. When applied to an operand that has structure or union type,
the result is the total number of bytes in such an object, including
internal and trailing padding. The trailing padding is such that
if the object were an element of an array, the alignment requirement
of the next element of this array would be satisfied, in other words,
sizeof(T) returns the size of an element of a T[] array.
3. Number of elements in any array a including VLA (since C99) may be
determined with the expression sizeof a / sizeof a[0]. Note that
if a has pointer type (such as after array-to-pointer conversion of
function parameter type adjustment), this expression would simply
divide the number of bytes in a pointer type by the number of bytes
in the pointed type.
https://en.cppreference.com/w/c/language/operator_arithmetic
10. If the pointer P points at an element of an array with index I, then
11. P+N and N+P are pointers that point at an element of the same array with index I+N.
12. P-N is a pointer that points at an element of the same array with index {tt|I-N}}.
20. If the pointer P1 points at an element of an array with index I (or one past the end)
and P2 points at an element of the same array with index J (or one past the end), then
P1-P2 has the value equal to J-I and the type ptrdiff_t (which is a signed integer type,
typically half as large as the size of the largest object that can be declared)
C++相談室 part145
■ このスレッドは過去ログ倉庫に格納されています
710デフォルトの名無しさん
2019/10/31(木) 13:21:36.49ID:Mfb82uAb■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 【中国外務省】日中関係悪化は高市氏に責任と名指しで非難… [BFU★]
- 外務省局長は無言で厳しい表情…日中の高官協議終了か 高市首相“台湾”発言で中国が強硬対応 発言撤回求めたか…★2 [BFU★]
- 政府、株式の配当など金融所得を高齢者の医療保険料や窓口負担に反映する方針を固めた [バイト歴50年★]
- 【維新】吉村知事「中国人観光客だけに頼るビジネスモデル変えていかないといけない」「高市総理の発言は撤回する必要はない」 [Hitzeschleier★]
- 「すごいアイドル出てきた」「かわいすぎる」ラヴィット初登場の美女に視聴者驚き ≠ME櫻井もも [ヴァイヴァー★]
- 小野田紀美・経済安保担当相「何か気に入らないことがあればすぐに経済的威圧をする国への依存はリスク」 [Hitzeschleier★]
- 【速報】中国が日中関係悪化は高市氏に責任と名指しで非難 [931948549]
- 中国高官と話す外務省局長の表情、やばい [175344491]
- ネトウヨ論調決まる「寧ろ迷惑中国人観光客が減ることで日本人の旅行が活性化され経済的には影響ない」 <mark>[ひまわり学級]</mark> [511393199]
- 日本政府「高市総理の発言は問題ないと伝え、中国総領事のSNS投稿は問題があると中国に伝えました😊」 [931948549]
- 【んな専🏡】なんG 姫森ルーナ(・o・🍬)総合スレ🏰【ホロライブ▶】
- 【高市速報】小野田キミ「中国依存はリスク」断交を示唆か [931948549]
