Why 42 is used..? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why 42 is used..?

int myArr[5]; for(int x=0; x<5; x++) { myArr[x] = 42; }

14th Jul 2017, 6:40 AM
Rahul.R
Rahul.R - avatar
2 Answers
+ 16
'42' is the universal answer of all questions ^^ (answer to the ultimate question of life, the universe, and everything) It's a reference to << The Hitchhiker's Guide to the Galaxy >> https://en.m.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy
14th Jul 2017, 6:45 AM
visph
visph - avatar
+ 10
https://en.m.wikipedia.org/wiki/42_(number)
16th Mar 2019, 8:53 AM
Janusz Bujak 🇵🇱 🇺🇦
Janusz Bujak 🇵🇱 🇺🇦 - avatar