How to compile and execute the program on UBUNTU operating system.
Steps for execution::
Step 1: Open the terminal by pressing Ctrl+Alt+t simultaneously.
Step 2: Open the editor by entering the command gedit on the terminal
Step 3: Once the editor is opened type the C program and save it by pressing Ctrl+s simultaneously, name of the program must be program_name.c. Make sure you have given .c as extension. e.g. p1.c, program.c etc.
Step 4: Compile the program by using the command gcc e.g. gcc p1.c
Note(After each modification in the program you must save it and recompile it)
Step 5: Execute the program using the command ./a.out
Step 1: Open the terminal by pressing Ctrl+Alt+t simultaneously.
Step 2: Open the editor by entering the command gedit on the terminal
Step 3: Once the editor is opened type the C program and save it by pressing Ctrl+s simultaneously, name of the program must be program_name.c. Make sure you have given .c as extension. e.g. p1.c, program.c etc.
Step 4: Compile the program by using the command gcc e.g. gcc p1.c
Note(After each modification in the program you must save it and recompile it)
Step 5: Execute the program using the command ./a.out
Comments
Post a Comment