Using Android Studio 2.2 and higher Native Development Kit (NDK) you can use to compile C and C++ code.
You can use NDK by manually downloading NDK and build it or through CMake .
Here I will give process flow for manually install NDK and an example code,
Based on your System OS you can download ...