Clojure Basic Programming Test

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Cripstwick
C
Cripstwick
Community Contributor
Quizzes Created: 636 | Total Attempts: 741,423
Questions: 10 | Attempts: 786

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
    C. Ens
    Explanation
    "ens" is not a recognized file extension for Clojure. Clojure commonly uses file extensions like ".clj" for Clojure source files, ".cljs" for ClojureScript source files, and ".edn" for Extensible Data Notation files. These extensions correspond to the respective types of code and data files used in Clojure development.

    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.

      2009

    • D.

      2017

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

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 19, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 29, 2018
    Quiz Created by
    Cripstwick
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.