I think you want something like this:
FILE *fp;
char cmd[1024];
char filename[1024];
sprintf(cmd, "find -inum %i -type f", iNode);
fp = popen(cmd);
fgets(filename, sizeof filename, fp);
pclose(fp);
At the end of this code, filename
will contain the fist line produced by the cmd
.