You have an array of size 3 of pointers to characters. These pointers do not point to any valid memory where you could possibly store some of those strings that you are reading in. Trying to write to invalid memory invokes UB. Here, UB manifests in the form of a segmentation fault (most probably because you are trying to write to a location you have no control on).
Try allocating some memory first: Say a big enough buffer to read in an entire line (or the biggest string that you think you are going to encounter). Read in, allocate a direction
array member and then copy it out as follows:
char *directions[ 3 ];
const MAX_LINE_SIZE = 256;
char line[ MAX_LINE_SIZE ];
for (size_t nstr = 0; nstr < 3; ++nstr) {
if (fgets( line, MAX_LINE_SIZE, stdin ) != NULL) {
directions[ nstr ] = malloc( strlen( line ) );
strcpy( directions[ nstr ], line );
}
printf( "%s\n", directions[ nstr ] );
}