How To Run C Program In Ubuntu Linux

  • Uploaded by: Manmohan garg
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View How To Run C Program In Ubuntu Linux as PDF for free.

More details

  • Words: 196
  • Pages: 1
after installing the latest version of Linux and installing all updates 1. open terminal program :which is in applications-accessories-terminal. # for 2 and 3 step you need an internet connection. 2. type in the terminal: sudo apt-get update 3. type in the terminal: sudo apt-get install build-essential 4. go to the location where you have to save your c file by using cd command in the terminal : mine is "cd Documents" 5. type: gedit filename.c :this will open a new window where you can type your c commands. remember getch() in windows is getchar() and no need of clrscr(): I have written "gedit hahah.c" and then in the gedit window I wrote: "#include<stdio.h> main() { printf("ha..ha..ha.."); getchar(); }" 6. save that file 7. open the terminal and type :gcc filename.c :mine is gcc hahah. this will compile the c program and a file named a.out will be autometically created in the folder you have your c file.(remember you should be in that particular place in the terminal where you have stored the c file ) 8.type ./a.out in the terminal program. hurrreee this will run your c program. 9. press exit to exit the editor.

Related Documents

How To Run Firewall
May 2020 12
Linux Ubuntu
April 2020 36
Linux Ubuntu
April 2020 31
How To Pop3 In C#
November 2019 8

More Documents from "Steven Hardy"