1

When writing ruby code, it is easy to test how different functions behave by testing them out in irb. But to test code in C, I usually have to open up a separate IDE and write code there to test how it works. Is there an interpreter-like tool available in Unix or Windows platform?

3 Answers3

1

C is not an interpreted language. However, there are a couple interpreters. I think the best one is Ch however it is not open source. CINT is open source:

http://directory.fsf.org/project/CINT/

BobbyShaftoe
  • 28,337
  • 7
  • 52
  • 74
1

If you just want to test a copy & paste-able bit of code, I often use CodePad to see the results of single functions immediately without compiling. It has its limits, though.

Max
  • 1,044
  • 10
  • 19
0

I think Ch is the closest you'll get to a C/C++ REPL. I believe it supports all features of C and some of C++.

igowen
  • 641
  • 4
  • 8