which can pick up executable if it is available in PATH
like

int execv(const char *path, char *const argv[]);

I do not want to specify full path , I want it to search in my PATH and execute .

execvp()

use ShellExecute on Windows

^ the question was answered and the OP marked it as "solved" already.

so why do you think its necessary to come in and add your wrong answer?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.