you can use one of the following code:
CONSOLE APPLICATION:
#include <windows.h>
void main()
{
ShellExecute( NULL, "open", "path_to_file", NULL, NULL, SW_SHOWNORMAL );
}
WINDOWS APPLICATION:
#include <windows.h>
#include <shellapi.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
ShellExecute (NULL,"open","path_to_file",NULL,NULL,SW_SHOWNORMAL);
return 0;
}