Where Can I Write C Program in Ubuntu?
Contents

How can I type C program in Ubuntu?

This document shows how to compile and run a C program on Ubuntu Linux using the gcc compiler.

  1. Open up a terminal. Search for the terminal application in the Dash tool (located as the topmost item in the Launcher). …
  2. Use a text editor to create the C source code. Type the command. …
  3. Compile the program. …
  4. Execute the program.

Where do I write code in Ubuntu?

HOW TO WRITE C PROGRAM IN UBUNTU

  • Open a text editor (gedit, vi). Command: gedit prog.c.
  • Write a C program. Example: #include int main(){ printf(“Hello”); return 0;}
  • Save C program with .c extension. Example: prog.c.
  • Compile the C program. Command: gcc prog.c -o prog.
  • Run/ Execute. Command: ./prog.
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest