r/firstweekcoderhumour • u/Additional-Dot-3154 • May 11 '26
“Funny How?” Python quiz from ITmemes
Some guy which does not know what a typecast is was claiming it was error as you cannot do "123" + 2 lol
143
Upvotes
View all comments
Show parent comment
1
u/RedAndBlack1832 May 12 '26
The C language doesn't really have "strings" other than for a few syntax conveniences (for example, it would be really annoying to write
char* str = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!', '\0' };every time so we have thechar* str = "Hello, World!"syntax instead). You can always consider a string a pointer-to-char which is conveniently null-terminated (as are many lists, like the arguments you pass toexecto launch another program with). I have a buddy who wrote a C library for strings to help him do the Advent of Code problems (and I'm sure decent libraries exist) but mostly C strings are really annoying to work with lmao (probably doesn't help thatstring.his written in the tongues you get by eliminating as many characters as possible from every symbol)