You have to think how your "string" is actually represented in memory. In C, strings are buffers of allocated memory terminated by a 0 byte.
filename |p|i|c|t|u|r|e|0|
directory |/|r|d|/|0|
What you require is a new memory space to copy the memory content of both strings together and the last 0 byte.
path |p|i|c|t|u|r|e|/|r|d|/|0|
Which gives this code:
int lenFilename = strlen(filename); // 7
int lenDirectory = strlen(directory); // 4
int lenPath = lenFilename + lenDirectory; // 11 I can count
char* path = malloc(lenPath + 1);
memcpy(path, filename, lenFilename);
memcpy(path + lenFilename, directory, lenDirectory);
path[lenPath] = 0; // Never EVER forget the terminating 0 !
...
free(path); // You should not forget to free allocated memory when you are done
(There may be an off-by-1 mistake in this code, it is not actually tested... It is 01:00am and I should go to sleep!)