June 23, 2017

How to compile C , C++ Programming on Mobile

Start Compaling C Programming on Mobile

Now its Easy to Complie C Programming with a Android Mobile, it Help you a lot when you are out of your System

How to compile c programming on Android Mobile

Now days many People are using Smart phones
But They don't know the amazing features inside it , So we are Here to Help you.
There are lot of ways to compile C, C++ Programming using your android mobile in online  , we are going to teach you how to Compile C, C++ Programming using your Android mobile in offline

How to Compile C , C++ Programming In Android Mobile using C4Droid

just follow below steps to Set up your C programming IDLE in Mobile

You need not to set up an IDE in mobile,  it will automatically set up an environment to code and compile

Just Download an App called C4Droid from Play Store [Paid Playstore] [Free Download]
And Install it
After successful installation Just open it
Wait for few seconds it will automatically set up  IDE

Now You have to Write your Programs and Compile it , if there is no error then Run it
That's all you will see your programme output

For C++ you have to Download C4Droid's GCC+ Free Plugin

Write ProgrammeProgramme Output

Basic Features of it

Offline C compiler: create your own applications on Android device and run them even without Internet access

- Source code editor with syntax highlighting, tabs, code completion, code formatting, file association and undo/redo

- Export&share your programs as APKs or native executables (for terminal apps)

- No root required (but C4droid can use it for your programs if you want)

- Full ANSI C and ISO C99 support with TCC (Tiny C Compiler) uClibc- Git integration

- Customizable GUI, choose where to place tabs and buttons by yourself, themes are also supported
.More features with a free GCC plugin:- Fully-functional C compiler, almost complete C 11 support with GCC compiler

- NativeActivity, Qt, SDL and SDL2 support for GUI

- Debugger with breakpoints and watches

- Makefile support: use the same build scripts as on your PC (BusyBox is included)

- Semi-automatic open-source library porting feature for enhanced prograStart programming in C with your Mobile

There is another way to Compile C, C++ Programming using Android mobile with the help of Termux App

How To Compile C, C++ Programming Using Termux On Android

Now its easy to compile c , c++ programming using Termux Android app , Root is not at all required to compile c, c++ programming on Mobile

Follow below steps carefully to know how to compile c, c++ programming using Termux on Your Mobile

Step 1 : Firstly You Have to Download Termux App From Play store  , its seize is less than 1mb
Also Download Hackers Keyboard , it is a good keyboard with many functions its also less than 1mb in seize

Step2 : After Downloading Termux , you have to update its built-in busybox

So type below command to update

apt update && apt upgrade

And hit Enter

It just takes few seconds to complete

Step3 : After that you have to install GCC on Termux , don't worry  just type below commands on Termux to install

Type below command to give file management permission


just hit Enter and give permission

Now you have to install GCC , so type below command to do

pkg install clang

It will take few minutes to install clang packages and unpack

During installation you will be asked , Termux will use some space just type Y For Yes

After installation successful you can check gcc version by typing below command on termux , once clang package is installed in termux you can compile c ,c++ programming

Check GCC version on Termux

Step 4 : To Write and compiling a c, c++ programme , you have to use a text editor
here we are going to use Nano Text editor inside termux

type this command to install nano in termux

pkg install nano

And Hit Enter , it will take few minutes to be installed

Step 5 : after installing nano , now we have to write our programme

just type below command to create a file and write

nano hello.c

Now write your programme and to save that
you have to type  CTRL+x using Hacker's Keyboard

Or you can save it by pressing Volume down(-) button and x simultaneously

Note that in c progarmming the file must be saved with .c extension

Step 6 : After saving the file you have to compile that , just type below command to compile

clang filename.c -o filename

Here you can change filename to your desired filename and the output is based on its filename , if you will use only this command clang filename.c then the out put will be in filename.out

You may already known about it so  , we have saved our file in hello.c lets compile it by typing the bellow command

clang hello.c -o hello

If there is no error then it will be compiled , if any error found then it will show you the error
in our program there is no error so type below command to the output


Here filename is that which we have choosen after -o filename

we are choosen hello , by typing ./hello
our output is given

Write ProgrammeProgramme Output
C programming using Termux on AndroidHow To compile c programming on Termux android

Step 7 : In the same way we can compile c++ programming in termux ,

Once you have installed clang package and nano , you can compile c, c++ without Root and  offline mode

Lets compile a c++ programme using termux

Type below command to write a programme , in c++ programming we have to save the file with .cpp extension

nano filename.cpp

we have created with techncyber.cpp

Type below command to compile it

c++ filename.cpp -o filename

If there is no error then it will be compiled otherwise it will show you the error

to see its output you have to type this command

here we are typing


Write ProgrammeProgramme Output
C++ programming using TermuxHow to compile C++ programming using Termux

You can see the list of programmes you have written and executed by typing ls Command

If you know the linux commands then you easily do more stuff with termux

Hope you have learnt How To Compile c, c++ programming on Your Mobile with C4 Droid and Termux

If you have any questions please feel free to leave comments..

Incoming Search terms:

How to setup C programming IDLE in Mobile,
How to Compile C programming with Mobile, C programming with Mobile, C4Droid App for Android,
How to run c programming files with Mobile, C4Droid apk for free

No comments:

Post a Comment