This generates an IPC key on the basis of the supplied filename and ID. The filename can be provided along with its complete path. The filename must refer to an existing file. Here is the syntax:
key_t ftok(const char *filename, int id);
The ftok function will generate the same key value if the same filename (with same path) and the same ID is supplied. Upon successful completion, ftok will return a key, otherwise it will return -1.