Clojure Basic Programming Test

Approved & Edited by ProProfs Editorial Team
At ProProfs Quizzes, our dedicated in-house team of experts takes pride in their work. With a sharp eye for detail, they meticulously review each quiz. This ensures that every quiz, taken by over 100 million users, meets our standards of accuracy, clarity, and engagement.
Learn about Our Editorial Process
| Written by Cripstwick
C
Cripstwick
Community Contributor
Quizzes Created: 693 | Total Attempts: 678,987
Questions: 10 | Attempts: 747

SettingsSettingsSettings
Clojure Basic Programming Test - Quiz

Emphasized on functional programming, Clojure is a programming language that treats code as data. If you're starting to develop an interest, beginning to learn, or just want to know how it works, take this basic programming test.


Questions and Answers
  • 1. 

    Clojure is based on which programming language?

    • A. 

      PHP

    • B. 

      Ruby

    • C. 

      Python

    • D. 

      Lisp

    Correct Answer
    D. Lisp
    Explanation
    Clojure is based on Lisp. Lisp is a programming language that was developed in the late 1950s and is known for its unique syntax and powerful macro system. Clojure, created by Rich Hickey in 2007, is a modern dialect of Lisp that runs on the Java Virtual Machine (JVM). It leverages the strengths of Lisp and provides seamless integration with Java, making it a popular choice for building scalable and concurrent applications.

    Rate this question:

  • 2. 

    Which of these platforms is not used to run Clojure? 

    • A. 

      Java Virtual Machine

    • B. 

      Common Language Runtime

    • C. 

      HyperText Markup Language

    • D. 

      JavaScript

    Correct Answer
    C. HyperText Markup Language
    Explanation
    The correct answer is HyperText Markup Language. HTML is not a platform used to run Clojure. Clojure is primarily run on the Java Virtual Machine (JVM) and can also be run on the Common Language Runtime (CLR) and JavaScript platforms. HTML, on the other hand, is a markup language used for creating web pages and does not provide a runtime environment for running programming languages like Clojure.

    Rate this question:

  • 3. 

    Who designed Clojure? 

    • A. 

      Rich Hickey

    • B. 

      James Borderman

    • C. 

      Huateng Xue

    • D. 

      Jerry Clojure

    Correct Answer
    A. Rich Hickey
    Explanation
    Rich Hickey is the correct answer because he is the creator and designer of the programming language Clojure. He developed Clojure with the goal of combining the benefits of functional programming with the practicality and efficiency of a dynamic language. Rich Hickey's expertise and vision in programming languages led to the creation of Clojure, which has gained popularity for its simplicity, concurrency features, and seamless integration with existing Java code.

    Rate this question:

  • 4. 

    Which of these is not a file extension for Clojure? 

    • A. 

      Clj

    • B. 

      Cljs

    • C. 

      Ens

    • D. 

      Edn

    Correct Answer
    D. Edn
    Explanation
    The file extension "edn" is not a valid file extension for Clojure. Clojure files typically have the extensions "clj" for Clojure source code files and "cljs" for ClojureScript source code files. "ens" is not a recognized file extension for Clojure either.

    Rate this question:

  • 5. 

    Which of these is not a Clojure variable? 

    • A. 

      Print

    • B. 

      Short

    • C. 

      Char

    • D. 

      String

    Correct Answer
    A. Print
  • 6. 

    How can you declare a variable in Clojure? 

    • A. 

      (def var- name var- value )

    • B. 

      [def var- name var- value]

    • C. 

      {def var- name var- value}

    • D. 

      Def var- name var- value

    Correct Answer
    A. (def var- name var- value )
    Explanation
    In Clojure, a variable can be declared using the syntax (def var- name var- value). This statement defines a new variable with the specified name and assigns it the given value. The "def" keyword is used to declare a variable in Clojure. The variable name and value are enclosed in parentheses, with the name followed by the value.

    Rate this question:

  • 7. 

    Which of the following does Clojure use?

    • A. 

      Alphabets

    • B. 

      Positive integers

    • C. 

      Negative integers

    • D. 

      0 and 1

    Correct Answer
    B. Positive integers
    Explanation
    Clojure is a programming language that uses positive integers. This means that it supports the use of whole numbers that are greater than zero. Positive integers are commonly used in programming for various purposes such as counting, indexing, and performing mathematical operations. Clojure's use of positive integers allows developers to manipulate and work with numerical data in their programs.

    Rate this question:

  • 8. 

    How many types of Clojure maps exist?

    • A. 

      4

    • B. 

      3

    • C. 

      2

    • D. 

      1

    Correct Answer
    C. 2
    Explanation
    Clojure maps have two types: hash maps and sorted maps. Hash maps are the most commonly used type and store key-value pairs in an unordered manner. Sorted maps, on the other hand, store key-value pairs in a sorted order based on the keys. Therefore, the correct answer is 2.

    Rate this question:

  • 9. 

    What is the stable version of Clojure? 

    • A. 

      4.8

    • B. 

      3.8

    • C. 

      2.8

    • D. 

      1.8

    Correct Answer
    D. 1.8
    Explanation
    The stable version of Clojure is 1.8.

    Rate this question:

  • 10. 

    When was the first stable Clojure version released?

    • A. 

      2014

    • B. 

      2015

    • C. 

      2016

    • D. 

      2017

    Correct Answer
    C. 2016
    Explanation
    The first stable Clojure version was released in 2016.

    Rate this question:

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.