Is that a possible to give a function page like ideone using coderunner jobe, for students to test a normal programming code.

Option 2 does not currently allow the user to provide standard input or to read files, though I hope to extend it to allow that later this year.
Note that if you install the Moodle embed questions filter plugin, you can put a question of the sort described in (1) above into any web page, not only into a quiz.