To run,
$bash incin.sh
You could of course add it to your path and then call it like incin anywhere.
The program takes your input, puts it inside a simple c program, compiles and returns you the result. It does this for all input, so previous variables declared are remembered. Keep in mind that previous printf statments or anything that produces output will also be re-ran.
Just a simple experiment, however, if you find it useful, let me know.
Should be helpful for anyone coming from a language like python or ruby to quickly test syntax of statements in c.
$ bash incin.sh
Welcome to IncIn, an inline interpreter for c
>>> float a = 4.23123123; printf("A = %0.2f", a);
A = 4.23
>>>