Answered step by step
Verified Expert Solution
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started