Org and babel in emacs are awesome. Is it possible to have something like this:
Here is a C code
#+BEGIN_SRC C :output results
#include <stdio.h>
int main(){
int x = 5.00;
int i;
for (i = 0; i < 5; ++i) {
x = x+1;
}
printf("X = %d", x);
return 0;
}
#+END_SRC
Then I would like to use this X in another programming environment, say Python and do something else with this X.
#+BEGIN_SRC python :output resultPython
print(x+2)
#+END_SRC
It is not as simple as just directly use the variable X. Is it possible to do this in Babel?