codeRunner can save your trouble to write/compile the c program on your own. Simply type the code line by line and codeRunner will execute it for you. It is good for education/testing use. At present, codeRunner only support the C language. However, codeRunner is designed not only for the C language. In the future, other languages will be supported.
-
enter c code and codeRunner will compile and run your code
codeRunner:#1> int a = 100;whenever this line of code has output, it will print on the screen
codeRunner:#2> printf("%d\n",a++); 100after that you can enter another line of c code
codeRunner:#3> printf("%d\n",a); a=101 -
if your code failed to compile, such as
codeRunner:#2> printf("%d\n",b) // b is not declared error info output by the compiler: b is not declaredyou can enter again your code
codeRunner:#2> printf("%d\n",a); 101
The default template provided by codeRunner is rather simple,
and it may missing some headers. So you can use --template=template.c
to specify template.c as your code template.
/* c code template for codeRunner */
#include<stdio.h>
#include<stdlib.h>
int main()
{
$$yourCode$$
return 0;
}will be replaced by your code typed by codeRunner. Make sure it is in a single line.
- you should have
gccinstalled to compile the source code.
sudo apt install gcc
- you should have
libreadlineinstalled to do auto-complete
sudo apt install libreadline6-dev
-
execute
maketo generate the programcodeRunnerif you donot have readline installed usemake no-readlineinstead -
execute
make installandcodeRunnerwill be installed under/usr/local/bin/by default.
[x] use libreadline to make input more convienent [ ] user can choose a custom compiler [x] user can choose a custom code template [ ] support other languages such as c++ [ ] support functions
report bugs to shenyufly@163.com yshen 2017



