Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run an executable file with c language?

Tags:

c

system

I was trying to execute this program using C language compiler 3.0 every thing is going alright but when i run this program it never open firefox and when i run this program`s executable file it shows compatibility issue errors :( please help me

#include<stdlib.h>
#include<stdio.h>
int main(void)
{
 system("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
 return 0;
}
like image 660
Maqbool Ur Rahim Khan Avatar asked Jan 16 '26 20:01

Maqbool Ur Rahim Khan


1 Answers

Take a look at the execve function : http://msdn.microsoft.com/en-us/library/hyw61wtd(v=vs.80).aspx

like image 150
Intrepidd Avatar answered Jan 19 '26 18:01

Intrepidd