For on-site: use language of preference but one that you know well to write a program that takes words from a json file then count the instances of the words. After answering, they made it harder by adding opening file and closing to save the state of the application. They were mostly interested in the ideas I had while approaching the problems which was good.
For initial take home 24 hour exam, I was presented with java, c, javascript and few questions that allowed me to answer in language of preference. Questions ranged from how to do string concatenation in C to making a singleton multithreaded object in Java, to unit testing, to making some dynamic web code in angularjs or knockoutjs, others...