For ease of future access to the terminal application, right click its icon in the Launcher and
select “Lock to Launche
Step 2. Use a text editor to create the C source code.
Type the command
gedit hello.c
and enter the C source code below
#include<studio.h>
{
printf("Hello World\n")
;
}
Close the editor window.
Step 3. Compile the program.
Type the command
gcc -o hello hello.c
This command will invoke the GNU C compiler to compile the file hello.c and output (-o)
the result to an executable called hello.
Step 4. Execute the program.
Type the command
./hello
should result in the output
Hello World
Step 3. Compile the program
Type the command
gcc -o hello hello.c
This command will invoke the GNU C compiler to compile the file hello.c and output (-o)
the result to an executable called hello
Comments
Post a Comment