Computer Programming Languages For Beginners Quiz

10 Questions | Attempts: 398
Share

SettingsSettingsSettings
Programming Quizzes & Trivia

You can easily cheat with the internet, so your score is only as honest as you are. Let's play this quiz and learn more about it!


Questions and Answers
  • 1. 
    Which of the following is NOT true?
    • A. 

      A statement can contain statements.

    • B. 

      An expression can contain expressions.

    • C. 

      A statement can contain expressions.

    • D. 

      An expression can contain statements.

  • 2. 
    Scripting languages, by definition, require which of the following:
    • A. 

      Control structures

    • B. 

      Run-time interpretation

    • C. 

      A host environment

    • D. 

      A standard input and standard output api

  • 3. 
    IO in purely functional programming languages is typically accomplished through the use of
    • A. 

      Monads

    • B. 

      Heaps

    • C. 

      Dijkstra's Algorithm

    • D. 

      Eager evaluation

  • 4. 
    The defining characteristic of a closure is the presence of a(n)
    • A. 

      Anonymous function

    • B. 

      First-class function

    • C. 

      Bound variable

    • D. 

      Reference to an immutable local variable in an enclosing function

  • 5. 
    Algebraic Data Types are
    • A. 

      Arbitrary precision numeric types

    • B. 

      Tagged unions

    • C. 

      Arrays

    • D. 

      Unattainable

  • 6. 
    The "yield" keyword in Icon, XL, Ruby, Python 2.0, C# 2.0, and JavaScript 1.7 results in which of the following?
    • A. 

      The use of a generator

    • B. 

      The creation of an array

    • C. 

      An OS-level context switch

    • D. 

      The temporary release of a resource lock

  • 7. 
    A first-class function is a
    • A. 

      Function that takes no parameters

    • B. 

      Function that takes functions as parameters

    • C. 

      Function that is an object

    • D. 

      Closure

  • 8. 
    Between which two generations of programming languages is there no difference in run-time efficiency.
    • A. 

      First & second

    • B. 

      Second & third

    • C. 

      Third & fourth

    • D. 

      Fourth & fifth

  • 9. 
    Which of the following programming language families mandates a dynamic type system:
    • A. 

      Scripting Languages

    • B. 

      Functional Programming Languages

    • C. 

      Declarative Programming Languages

    • D. 

      None of the above

  • 10. 
    In Java, JavaScript, Python, and C# what is the result of executing the following pseudo code (translated into each languages respective syntax):try    throw exception1finally    throw exception2
    • A. 

      Exception1 is thrown and exception2 is never thrown.

    • B. 

      Exception1 is discarded and exception2 is thrown instead.

    • C. 

      Exception2 is thrown up the call stack and handled appropriately, then then same for exception1.

    • D. 

      Trick question. It's a compile error.

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.