Programming Joke | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Programming Joke

Two strings walk into a bar and sit down. The bartender says, “So what’ll it be?” The first string says, “I think I’ll have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy~~owmc63^Dz x.xvcu” “Please excuse my friend,” the second string says, “He isn’t null-terminated.”

6th Jan 2017, 5:54 PM
Jayesh Patel
Jayesh Patel - avatar
3 Answers
+ 7
Simply that when you don't null terminate your string, you get random memory garbage that follows the string in RAM. Without null at the end the compiler doesn't know where the string ends.
6th Jan 2017, 8:36 PM
Karl T.
Karl T. - avatar
+ 6
good one 👍
13th Jan 2017, 4:10 PM
FARZA
FARZA - avatar
+ 4
Who else is too stupid to get it? Just me? Ok...better start learning something then! I appreciate the joke anyway
6th Jan 2017, 6:03 PM
infinity
infinity - avatar