How to run c++ program on linux manjaro using terminal ,g++ compiler and nano editor

Learn How to Run C++ Program on Linux
How to  Run c++ program on linux minjaro using terminal ,g++ compiler and nano editor.

Step 1.Click application launcher

Step 2. Click terminal

Step 3.Run nano editor on terminal by writing command on terminal
Step 4. Write c++ program code as
     using namespace std;
    int main(){
        cout << "Hello World"  << endl;
        return 0;
Step 5. save file as hello.cpp  
      press  CTR + O
Step 6.Exit Nano by pressing CTR + x

Step 7. Compile hello.cpp by  command  on terminal
      g++ hello.cpp -o  hello
Step 8. Run hello program by command
Step 9. Watch Result

Author: Habibullah Qamar

Its me Habib Ullah Qamar working as a Lecturer (Computer Sciences) in Pakistan. I have an MS(M.Phil) degree in computer sciences with specialization in software engineering from Virtual University of Pakistan Lahore. I have an experience of more than 15 years in the filed of Computer Science as a teacher. Blog Writing is my passion. I have many blogs, This one is special made with the aim of providing 100% Free online coaching and training to the students of under-graduate and postgraduate classes. Most of the students enrolled in computer sciences, information technology, software engineering and related disciplines find it difficult to understand core concepts of programming and office automation. They find difficult in understanding and solving their assignments.

Leave a Reply

Your email address will not be published. Required fields are marked *