The challenge
You are given a function compile(s: String): Integer which returns 0 if s could be compiled and anything other than 0 if it failed (the resulting code is not important).
The thing is that you don't know for what language the function is made for, so it is up to you to figure that out by giving the function small snippets of code and observing what it returns. The good part is that a team of scientists have tried before you and have narrowed down the list to C, C++, C#, Java and JavaScript (these are the only widespread languages which have similar syntax I could think of).
Rules
- General code-golf rules apply.
- There is no strict output format; as long as it's readable and understandable it's ok.
- If these 5 languages are not enough for you then you can add your own favourites and you'll be rewarded with extra stars (★) (that do nothing).
Note1: the compiler is up to date with the latest standard of whatever language it's designed for.
Note2: I know JavaScript does not compile, but it goes though some parsing process; if it's valid JavaScript code then it passes