Recent Posts

Tuesday 26 May 2015

Executing C program in android mobile using terminal IDE

While studying about the android software stack . I got to know that the base is linux terminal . So I got one idea doubt if we can run the C program .
Yes of course we can execute the C program in android mobile using the app Terminal IDE ,which lets us to access the Linux terminal in our android mobile.

Here are the steps to download, install the terminal IDE in your mobile and executing C program.
First Step : Install the Terminal IDE app in your android mobile phone, which lets you to access your linux terminal in android mobile.

Second Step : Open the terminal IDE and select the option Install System.



Third Step : Now press back and select the Terminal IDE option to access your terminal IDE.Now navigate to the system folder and then to src folder, where this app is having the permissions to execute the file. To navigate to that directory type the command cd system/src . And also create the directory code where we are going to store our code using the command mkdir code


Fourth Step : Its now time to create the C program file, here i am creating the file test.c file and placing the code for "Hello World" program .Before that navigate to code folder using cd code . Commands to create and write the code are cat>test.c.

Fifth Step : Now in the terminal list select the another terminal other than Terminal 1 .


Sixth Step : We have to install the terminal GCC for compiling and executing the C Program. To install the terminal GCC type the command install_gcc .


Seventh Step : Its time for us to compile and execute the C program. Lets do that in three steps.
  1. terminal-gcc -c test.c
  2. terminal-gcc test.o -o test
  3. ./test

Smart Siva

Author & Editor

In Life every second is important, In programming every line of code is important.

3 comments:

  1. Thanks my guy.....u a geek

    ReplyDelete
  2. In my phone don't have an src directory in system.. What can i do ? Whether i have to create it? or not?

    ReplyDelete

 
biz.