#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#define LB_SIZE 1024
int main(int argc, char *argv[])
{
char fullPathName[] = “/usr/xain/bin/xeyes”;
char *myArgv[LB_SIZE]; // an array of pointers
myArgv[0] = (char *) malloc(strlen(fullPathName) + 1);
strcpy(myArgv[0], fullPathName);
myArgv[1] = NULL; // last element should be a NULL pointer
execvp(fullPathName, myArgv);
exit(0); // should not be reached
}