The main purpose of calling execl is replacing the current process image with the process image specified in execl. The following is the prototype:
int execl(const char* path, const char* arg0,...,(char*)0);
Here the path contains the path of the executable and args contain the arguments to be supplied to the executable where arg0 is the name of the executable. If this call is unsuccesful, it returns -1 with errno set to indicate the error. This allows the calling program to handle the error whereas when it is successful it doesn't return any value, instead the new process image starts executing.