Due date: tuesday 27/6.

1. Pointers

  1. Answer the exercises 1 to 15 of Chapter 2.

  2. Start from the program given at https://goo.gl/9VuMdX

    Write a function map that takes as arguments:

    When given an array aand a function f, map replaces each element a[i] of array a by f(a[i]).

    Write two functions int plusOne(int) and int square(int).

    Add to the main fuction the required code to apply funcions plusOne and square to the array by using the map function.

    (There is no need to add printf statements since PythonTutor enables us to directly visualize the array).

2. Linked Lists

  1. Reimplement Program P3.1 in PythonTutor, doing the following changes: