C++ Coding Challenge: Hello World without IDE or code editor | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

C++ Coding Challenge: Hello World without IDE or code editor

Pretty much what the title says. Create a fully functional program that prints the below string *verbatim*: Hello World! Rules: *. You cannot use a text editor of any kind. *. You cannot use an IDE (obviously). *. Only an executable binary must be left. *. The executable must run immediately and automatically during the process. In other words, it cannot require you double-click it or such, it must just run as if you pressed "Compile & Run" in an IDE. *. The least number of steps wins. *. You may write it in C or C++. *. Your solution does *not* have to be agnostic/universal/portable. *. Don't cheat by looking for an answer, you'll spoil ler fun. Good luck!

16th Aug 2017, 12:59 PM
Jamie
Jamie - avatar
6 Respuestas
+ 3
Input format? Explain? [Can be done with standard system utils, possibly anywhere, but definitely on all or most *nix environments with a single line from the shell].
16th Aug 2017, 5:59 PM
Jamie
Jamie - avatar
+ 2
Does linux console count as a text editor if I do not use vim, emacs and so on ?
16th Aug 2017, 4:34 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 2
@Baptiste Nope, a regular console isn't a text editor. *If it's a shell.
16th Aug 2017, 5:08 PM
Jamie
Jamie - avatar
+ 2
My input (on linux minth 17) : printf "#include <stdio.h>\nint main(){printf("Hello World");return 0;}" > __file__tmp__.c gcc __file__tmp__.c -o _hello__ ./_hello__ rm _hello__ __file__tmp__.c All done in one line : alias super_hello='printf "#include <stdio.h>\nint main(){printf(\"Hello World\");return 0;}" > __file__tmp__.c;gcc __file__tmp__.c -o _hello__;./_hello__;rm _hello__ __file__tmp__.c' But it is neither portable, nor fancy, nor a good practice :p simply remove "alias super_hello=' " and " ' " at the beginning and at the end to compile execute without having to type the name super_hello
16th Aug 2017, 6:50 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
Ahaha nice ! And what is the input format please ?
16th Aug 2017, 5:16 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
How you want us to answer :) Describ what we did is enough ?
16th Aug 2017, 6:15 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar