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. Open up a Terminal...
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.
- Open up a terminal. Search for the terminal application in the Dash tool (located as the topmost item in the Launcher). …
- Use a text editor to create the C source code. Type the command. …
- Compile the program. …
- 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.