From the man page:
The exec() functions only return if an error has occurred.
So, your execvp
call is presumably working, and thus it is not returning.
The point of the exec
functions is that they replace the currently running code with the code of another program, so it doesn't make sense that it would then return to your code once the program was done running.
Edit:
It looks like you're not calling your program correctly. I think you should be calling it like this:
char *arg[3] = {"test", (char*) 0};
int value = execvp("/home/ameya/Documents/computer_science/cs170/project1/test", arg);