>mfw char is just int in disguys
>>60053616
no!
>>60053681
>11011133
but that's wrong.
>>60053616
No he isn't. I'm ashamed to share a species with people like you.
>>60053616
>char is 1 byte
>int is 4 bytes
?
>>60053830std:: cout << sizeof(int) << " " << sizeof(char) << std::endl;
4 4
What are you smoking nigger
>>60055586
What arch?
>>60055614
x86_64
>>60055586
4 1
>mfw String is just [Int] in disguys
std:: cout << sizeof(int) << " " << sizeof(char) << std::endl;
4 1
>>60055586
instructions unclear, dick stuck in compiler.
>>60055586
No.
mfw computers are just beep boops in disguise
>>60055709
>coldphoenix@piwnica
You need to be 18 or older to post on this site
>>60053812
>>60053757
>>60053681
chars literally are just integers in C though. what do you think they are?
>>60053830
so numbers under 256 aren't integers?
>>60057531
>I don't need math to be a CS major!
2^8 is 256
There are 8 bits in a byte, for a total of 2^8 combinations
chars are "literally" just integers in the sense they are numbers, but they are NOT the data type integer.
>>60057548
>>I don't need math to be a CS major!
>2^8 is 256
>There are 8 bits in a byte, for a total of 2^8 combinations
.. that's.. what i was saying..?
>>60057704
No, you're confusing the mathematical term "integer" for the computational science term "integer"
they are wholly distinct.
>>60057531
"integer" in C is the name of a data type.
>>60057548
>>60057704
and in case you don't get it, chars are literally just numbers. the character "a" is 97, and the null character is 0.#include <stdio.h>
void main(){
printf("%c\n", 97);
}
the reason this outputs "a" isn't because of some kooky easter egg. chars are ints
>>60057742
see
>>60057726
raw values != ints
>>60057726
>computational science term "integer"
you mean C term, which is still wrong because it's called "int" not "integer"
>>60053616
mfw OP says some stupid shit that's just wrong
So many CS1 kids tripping up because OP said int instead of integer.
>muh datatype
>>60055741
I hope this becomes the next /g/ meme.
>>60053616
>mfw OP is a faggot in disguise
>mfw CPUs are just transistors in disguise
>>60055684
you have to go back
>mfw ints are just electrons in disguise
>>60057756
Suppose for whatever reason you wanted to minimize your memory footprint, and have your integers use only one byte. What do you do? You declare them as chars. Seriously. Or unsigned chars if you don't want signing
>everything is just bool in disguise
>>60055586
>>60055709
size depends on your architecture
>not using stdint
>>60053616
>mfw cpus are just rocks we taught to do math
>>60055586
>>60055678
You stupid sepplestards don't even know about integer promotion, do you?
int is just multiple chars tho
>>60060983
chars should only be used for storing characters.
signed char / unsigned char are used for numbers
>>60061041
>This is true!!!!!!!!!!!!!!!!
My life has been changed.
>CPUs use logic gates
:0
>>60061111
>logic gates
They use transistors, scrub.
How Can Keyboards Be Real If Our Hands Aren't Real
>>60061111
>>1111
delet this
thought char was quattro not int
mfw currency is just doubles in disguys
>>60055586
>C++
y'all ever thought that programming languages are just yep/nah in disguise
What if your computer goes past a long long?
>>60061424
depends on the language.
>C
segfault
>C++
gates to hell open
>java
throws exceptions until all RAM is used
>javascript
carries on as if nothing happened
>mfw saw OP and thought I was on /tg/
>>60061041
/thread
>>60055586
>>60055678
Why do you fukin losers type out
"std :: " multiple times instead of just declaring
"using namespase std;" once?
>>60062221
>>60062221
Ur a fuckin rerarded edglord beta orbiter obsessed with my ex and her fucking insane fantasy world
Threads reported. CPS informed. Cops are s arching for you and your crew. Hard. And one approaches me or tried to run game on me again and we gonna have real problems. Ur a fucking delusional stalker who knows nothing about other than what psycho ex girlfriends and roumour Mills from I'm 20 years ago. I'm not a fucking pedo. Never have been. Do us all a favor and fucking aanhero
>>60061494
>integer overflow results in a segfault
kek
>>60055709
>cold
>piwnica
sound comfy
>>60055586
char is *defined* as having sizeof equal to 1, dumbass.
>>60053616
YFW copute is binary in da skys
>>60060983
>>60057742
>>60053616
By that shitty logic, every data type is an int because lol everything is just 0s and 1s in the end for the computer.