nerdexam
EC-Council

312-50V9 · Question #125

What is the main disadvantage of the scripting languages as opposed to compiled programming languages?

The correct answer is D. Scripting languages are slower because they require an interpreter to run the code. Scripting languages incur a performance penalty because their code is executed line-by-line by an interpreter at runtime rather than being pre-compiled to machine code.

Introduction to Ethical Hacking

Question

What is the main disadvantage of the scripting languages as opposed to compiled programming languages?

Options

  • AScripting languages are hard to learn.
  • BScripting languages are not object-oriented.
  • CScripting languages cannot be used to create graphical user interfaces.
  • DScripting languages are slower because they require an interpreter to run the code.

How the community answered

(18 responses)
  • A
    6% (1)
  • C
    6% (1)
  • D
    89% (16)

Why each option

Scripting languages incur a performance penalty because their code is executed line-by-line by an interpreter at runtime rather than being pre-compiled to machine code.

AScripting languages are hard to learn.

Scripting languages are generally considered easier to learn than compiled languages due to simpler syntax and dynamic typing, making this statement incorrect.

BScripting languages are not object-oriented.

Many scripting languages such as Python and Ruby are fully object-oriented, so lack of OOP support is not a valid disadvantage.

CScripting languages cannot be used to create graphical user interfaces.

Scripting languages can be used to create graphical user interfaces - for example, Python supports GUI development via Tkinter, PyQt, and other frameworks.

DScripting languages are slower because they require an interpreter to run the code.Correct

Scripting languages such as Python, Bash, and JavaScript rely on an interpreter that parses and executes code at runtime, which introduces overhead compared to compiled languages like C++ that translate code directly to machine code before execution. This interpretation step means each instruction must be processed dynamically, resulting in slower execution speeds. For performance-critical applications, this is the primary trade-off when choosing a scripting language.

Concept tested: Interpreter overhead in scripting vs compiled languages

Source: https://learn.microsoft.com/en-us/windows/wsl/compare-versions

Topics

#scripting languages#interpreted code#compiled languages#performance

Community Discussion

No community discussion yet for this question.

Full 312-50V9 Practice