mercredi 4 février 2015

how to run a c code from a usb pendrive?


Vote count:

0




I had to run few code written by me on multiple computers, and once its done (complete compile and run) the code was not suppose to be present on those computers.

Previously i was able to accomplish this with codes written in python. By placing the python code inside the pen-drive and directly run them from the pen-drive itself.


say, I had a python codes that was placed inside my pen-drive(5A30-C211).



/media/5A30-C211$ python sample_code.py


i was able to get the output (where /media/5A30-C211 was my pen-drive). But i have some c code now. And when i do the same for a c code.



/media/5A30-C211$ gcc sample_code.c -o sample_code
/media/5A30-C211$ ./sample_code
bash: ./sample_code: Permission denied


as i saw the word Permission denied, i added sudo to the compile and run command. I get the output as command not found.


is there any way i could run a c code from a usb flash stick / pen-drive like i did with python?



asked 26 secs ago







how to run a c code from a usb pendrive?

Aucun commentaire:

Enregistrer un commentaire