[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Advertisement | Home]

>mfw char is just int in disguys

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 57
Thread images: 14

File: tumblr_omle8bWvfO1vrpazoo3_1280.jpg (37KB, 960x540px) Image search: [Google]
tumblr_omle8bWvfO1vrpazoo3_1280.jpg
37KB, 960x540px
>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
?
>>
>>60053830
std:: cout << sizeof(int) << " " << sizeof(char) << std::endl;

4 4

What are you smoking nigger
>>
>>60055586
What arch?
>>
>>60055614
x86_64
>>
>>60055586
4 1
>>
File: researcher man.jpg (325KB, 2136x3216px) Image search: [Google]
researcher man.jpg
325KB, 2136x3216px
>mfw String is just [Int] in disguys
>>
File: 1471019846910.png (186KB, 1190x838px) Image search: [Google]
1471019846910.png
186KB, 1190x838px
std:: cout << sizeof(int) << " " << sizeof(char) << std::endl;

4 1
>>
>>60055586
instructions unclear, dick stuck in compiler.
>>
File: 1481002395568.png (76KB, 644x417px) Image search: [Google]
1481002395568.png
76KB, 644x417px
>>60055586
No.
>>
File: reallymakesmethin.png (59KB, 453x261px) Image search: [Google]
reallymakesmethin.png
59KB, 453x261px
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
>>
File: 1492314001260-co.png (376KB, 505x506px) Image search: [Google]
1492314001260-co.png
376KB, 505x506px
>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
>>
File: 1360230792061.jpg (29KB, 562x410px) Image search: [Google]
1360230792061.jpg
29KB, 562x410px
>>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.
>>
File: 1475172929524.jpg (165KB, 1890x1417px) Image search: [Google]
1475172929524.jpg
165KB, 1890x1417px
How Can Keyboards Be Real If Our Hands Aren't Real
>>
File: 1479414335712.jpg (22KB, 346x450px) Image search: [Google]
1479414335712.jpg
22KB, 346x450px
>>60061111
>>1111
delet this
>>
thought char was quattro not int
>>
mfw currency is just doubles in disguys
>>
>>60055586
>C++
>>
File: hm.png (51KB, 497x480px) Image search: [Google]
hm.png
51KB, 497x480px
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
>>
File: dog benis.jpg (56KB, 600x583px) Image search: [Google]
dog benis.jpg
56KB, 600x583px
>mfw saw OP and thought I was on /tg/
>>
File: 668.gif (57KB, 400x300px) Image search: [Google]
668.gif
57KB, 400x300px
>>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.
>>
File: 1492564647601.png (91KB, 240x255px) Image search: [Google]
1492564647601.png
91KB, 240x255px
>>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.
Thread posts: 57
Thread images: 14


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

If you need a post removed click on it's [Report] button and follow the instruction.
If you like this website please support us by donating with Bitcoin at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties. Posts and uploaded images are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that website. If you need information about a Poster - contact 4chan. This project is not affiliated in any way with 4chan.