What is C ?
C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations.
Open Termux app and type following commands
$ pkg install clang
$ pkg install nano
To write your c program type
$ nano filename.c
Hello world program in c :
#include <stdio.h>
int main()
{
printf("Hello, World!");
return 0;
}
To compile your c program type
$ gcc filename.c -o aliasname
Example : gcc hello.c -o h
To run your c program type
$ ./aliasname
Example : ./h
How to install C++ ?
Open Termux app and type following commands
$ pkg install clang
OR
$ pkg install g++
$ pkg install nano
To write your c++ program type
$ nano filename.cpp
Hello world program in c++
#include <iostream> using namespace std; int main() { cout << "Hello, World!"; return 0; }
To compile your c++ program type
$ g++ filename.cpp -o aliasname
Example : g++ hello.cpp -o h
To run your c++ program type
$ ./aliasname
Example : ./h
Supper
ReplyDeleteCctv hack video
ReplyDeleteYe sahe nahe h
ReplyDeleteHow to compile the code?
ReplyDeleteIt's showing me error!!
Plz teach me this??
Anybody??
👍
ReplyDeleteIt shows up "Permission denied" comment
ReplyDeleteRun termux-setup-storage first then applied above code
Deleteahmednadir12345@gmail. com
DeleteAhmednadir12345ox@gmail
ReplyDelete