Which of the following lines of code is not in proper Syntax for its language?
- VISIBLE "HAI WORLD!!!1!"
- console.log(Hello World!);
- cout << "Hello World!" << endl;
- TALK TO THE HAND "Hello, World!"
EXPLANATION
The correct answer is console.log(Hello World!); The code is written in JavaScript and it is missing the apostrophes around 'Hello World!' The working version of this code would be: console.log('Hello World!');The rest of the lines of code are all completely legal for their own language. The first being C++ the code cout << "Hello World!" << endl; will print the words "Hello World!" to the console and then move to the next line.
The next answer is written in ArnoldC which is a language based off of quotes from movies that featured Arnold Schwarzenegger. YOU HAVE BEEN TERMINATED
The final, and my favorite is called LOLCODE, which is a c based language that features language used by the stereotypical lolcatz. If you would like to learn more about this language there is a website dedicated to its use. you can find it here at http://lolcode.org
PS. Yes I sourced wikipedia, it only let me source one website.
0 comments:
Post a Comment