In this c programming tutorial we are going to see How To run C programs on your android phone you need “Terminal IDE” android app installed on your phone. Click here to install this app from play store.

Once you have installed Terminal IDE, open it and now will see six buttons there on screen, from those buttons choose Install System, and then scroll down check the checkbox Overwrite ALL and then click Install System. By doing this some basic C / binary system files get installed in your phone (in applications private memory)

Next Step is to install gcc on your phone; it will take up to 70MB memory on your phone, to install gcc, go to the main options in app then terminal screen will be opened, type install_gcc on terminal and hit enter from your android keyboard now gcc is installed on your mobile.

To test it type cd  ~/system/src/c_examples/chello/ on terminal and hit enter , this will switch the current working directory of terminal to ~/system/src/c_examples/chello/. This directory already contains one test program. To see the file name and then open that c program type ls and then type cat hello.c  , now you can see it is a simple c program to print some message on the screen.

To compile this simple c program type terminal-gcc hello.c  and then to run the program type ./a.out , now you can see the output of this program on your screen.

You can also create your own c program and run using this app, just remember to use cd command to switch your current working directory to point to place where your program is present. You can even create and run java programs, shell script using this android application. For more details click on Help button from main screen of app and then select Tutorials, you can get all details about how to use this application.

Terminal IDE android app is available under GPLv2, code is available at: http://code.google.com/p/terminal-ide/

Thank You for reading 🙂

Tag

Related Post

1 Comment

  1. Por CHEUNG

    terminal-gcc is the word i need. Thanks.

Leave a Reply