Can some one explain this joke to me: 10 home 20 sweet 30 goto 10?!


Question:

Can some one explain this joke to me: 10 home 20 sweet 30 goto 10?


Answers:

It's not really a joke, but rather a funny chunk of programming code.
Explanation:

10 home
20 sweet
30 goto 10

10, 20, and 30 are line identifiers. As code is run/compiled it goes from the first to the last. I believe 10 should actually read print "home" and 20 should read print "sweet". When the program is run it will print: "home" "sweet" "home" and so on...over and over again. Line 30 is directing the program to go back to 10 and run from there. It is an infinitely looping program that spits out "home sweet" over and over again.


The answer content post by the user, if contains the copyright content please contact us, we will immediately remove it.
Copyright © 2007 enter-qa.com -   Contact us

Entertainment Categories