Today, I stumbled upon a web page which has got an online interpreter/compiler interface for many languages including C, C++, D, Haskell, Lua, OCaml, Php, Perl, Python, Ruby, Scheme and Tcl.
Just write your code, select the corresponding language and hit the submit button.
You will be forwarded to an other page in which the output of your code is shown.
Click here to goto codepad.org. Have Fun!