You are here:

C/about file handling

Advertisement


Question
sir,
how to execute *.exe file using file handling in c,
fopen("c:///*.exe").....not working..
pls,tell me what is the command or any other method for executing file.
i m waiting for u r reply,
regards,
prashant

Answer
Hi Prashant

If you are using Turbo C then try using system() to execute exe file the system function takes dos command as input and excutes it otherwise try execv for linux or try spawn.

Please lemme know in case of any doubts or problems

regards
Joydeep Bhattacharya
http://www.scodz.com

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joydeep Bhattacharya

Expertise

Ability to solve C and Data Structure problems and puzzles with simple and easy to understand logic.

Experience

C, C++, Java, Data Structure, PHP, Web Designing

Organizations
http://www.scodz.com Designation: webmaster

Publications
http://www.scodz.com

Education/Credentials
Master of Computer Applications

Past/Present Clients
http://analysingc.50webs.com http://www.funforu.com

©2012 About.com, a part of The New York Times Company. All rights reserved.