Clojure Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Clojure Interview Questions & Answers

Are you looking for a career in Clojure? Searching for the best interview questions to be asked in interviews. Here’s a solution. Clojure is a general purpose programming language with an emphasis on functional programming. It runs on the Java virtual machine and the Common Language Runtime. Top companies are looking for the experienced and entry level Clojure professionals with expertise in the language. The candidates should have basic knowledge of Java and Dot net to win the job interview. We’ve covered java, dot net and clojure job interview questions for your preparation. Have a look at wisdom jobs clojure job interview questions and answers for better perspective of job interviews. Having familiarity on LISP programming language will give an edge in winning in job interviews.

Clojure Interview Questions

Clojure Interview Questions
    1. Question 1. What Is Clojure?

      Answer :

      Clojure is a Lisp family language, open source, dynamic type system and general purpose programming language developed for the Java Virtual Machine (JVM) and created by Rich Hickey.

      Clojure is a compiled language.

      Clojure is a dialect of Lisp and a powerful macro system.

      Clojure is a wonderfully simple language and I hope you love it.

    2. Question 2. Why Clojure?

      Answer :

      Clojure is open source, dynamic type system and general purpose programming language.

    3. Question 3. What Are The Languages Fundamentals?

      Answer :

      • Clojure is based on Lisp and general purpose programming language.
      • Clojure is functional programming language
      • Clojure is dynamic type system
      • Clojure is runs on the JVM
      • Clojure is open source

    4. Question 4. How To Run Clojure?

      Answer :

      Local build -

      git clone https://github.com/clojure/clojure.git

      cd clojure

      ./antsetup.sh

      ant local

      Then start the REPL with the local jar -

      java -jar clojure.jar

      Try Clojure online - Provides a browser based Clojure repl for interactive exploration.

    5. Question 5. How Do I Create A Clojure Project?

      Answer :

      You can use Leiningen to generate the scaffolding of a new Clojure application-

      lein new app project_name

      Generating a project called “project-name” and it’s based on the “app” template.

    6. Question 6. Does It Have A Build Automation System?

      Answer :

      It helps developers to scaffold new projects, resolve dependencies, run tests, etc.

    7. Question 7. How To Create Your First Project?

      Answer :

      Create your first Clojure program and looks like-

      lein new app my-proj

      cd my-proj

      # Have a look at the "-main" function in src/my proj/core.clj.

      lein run

    8. Question 8. What Versions Of Java Have Been Tested?

      Answer :

      Clojure 1.0 and 1.1 are both routinely used by many people on various versions of:

      Sun's JRE 1.5.0 and 1.6.0

      OpenJDK 1.5.0 and 1.6.0

      IBM J9

      It is also known to run on:

      JamVM with Classpath

    9. Question 9. What Versions Of Java Are Supported?

      Answer :

      Clojure currently targets Java 5 (and later versions).

    10. Question 10. Where Does Swank-clojure (slime) Look For Clojure's Jars?

      Answer :

      When you start it with M-x slime, it will add all jars under check ~/.clojure and ~/.swank-clojure to your classpath. You will need at least clojure.jar, clojure-contrib.jar and swank-clojure.jar. You can download pre-built Clojure and Contrib jars from build.clojure.org and swank-clojure.jar from Clojars.

    11. Question 11. How Do I Fetch Web Pages And Make Http Requests?

      Answer :

      For the simple case of GETing a document into a string you can simply pass a URL to clojure.contrib.duck-streams/slurp*:

      (use 'clojure.contrib.duck-streams)

      (slurp*  "http://www.example.org/")

      ;; ⇒ "<HTML>rn<HEAD>rn  <TITLE>Example Web Page</TITLE>

      For more advanced usage, including other request types like POST you may find the clojure-http-client library useful. Finally you can of course use (.openConnection) on a Java URL object directly.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Lisp programming Tutorial