Legfrissebb anyagok
IT café témák
PROHARDVER! témák
Mobilarena témák
Új hozzászólás Aktív témák
-
Jester01
veterán
A sizeof(char) nem fogja megmondani a char méretét mert az definíció szerint mindig 1 lesz. C szabvány, 6.5.3.4.3 pont a sizeof operátorról: "When applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1."
A CHAR_BITS az viszont igen
Jelenleg azonban nem ez a probléma, hanem az, hogy a ~ operátor (unsigned) int típusra automatikus konverziót csinál, lásd szabvány 6.5.3.3.4: "The result of the ~ operator is the bitwise complement of its (promoted) operand ... The integer promotions are performed on the operand, and the result has the promoted type."
Új hozzászólás Aktív témák
Téma tudnivalók
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
Aktív témák
Új fizetett hirdetések
- iPhone 16 Pro Max, Black Titanium 512GB 3 év Magyarórszági Garancia. Független és rengeteg tartozék!
- AKCIÓ!!! GAMER PC: Új RYZEN 7 5700/5800X + RX 7800 XT 16GB GDDR6 + Új 16-32GB DDR4! GARANCIA/SZÁMLA!
- ELADÓ: Corsair Vengeance RGB PRO 2x16GB 3200MHz DDR4
- iPhone 14 Pro 128 GB Silver, Független! Mint egy új! 91% Akku! 2026.04.16-ig garanciális!
- Macbook Air 13" 2015
Új ingyenes hirdetések