Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4(a) Explain the difference between compilation and interpretation. What are the advantages and disadvantages of the two approaches? (8 marks) (b) Give a short

 

4(a) Explain the difference between compilation and interpretation. What are the advantages and disadvantages of the two approaches? (8 marks) (b) Give a short overview of the main characteristics of the following programming paradigms. In each case give an example of a programming language that follows the paradigm. 1) Imperative 2) Logical and 3) Object-oriented. (12 marks) (c) One of the features of functional programming languages is higher-order functions. Describe what a higher-order function is. (3 marks) (d) Write a program in Haskell that given the following list of numbers (-1, 2, -3, 4, -5), prints the squares of the even numbers. (7 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

a Compilation vs Interpretation Compilation Compilation is the manner of translating the whole supply code into device code or an intermediate languag... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Personal Finance Turning Money into Wealth

Authors: Arthur J. Keown

8th edition

134730364, 978-0134730363

More Books

Students also viewed these Programming questions