UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

5.12.3.  Arrays of pointers

Work Plan

Usually, it is very common and useful to declare an array of pointers. It is specially common when we want to have an array of strings. If an string can be implemented as char *c;, an array of strings can be implemented as char **c; or char *c[x];.

Given the following array of pointers:

#define SIZE 7
char *str[7] = {"Sunday",
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
                "Saturday"};

Creates a new file, arrays_of_pointers.c, and implement a function with the prototype void print_strings(char **str); which prints out the 7 strings.