Compiling HEYWORLD.C
Assuming that you have thumbed through it already, use your powerful human memory to
recall the proper command to compile and link the HEYWORLD.C source code.
Here’s a hint:
gcc heyworld.c -o heyworld
Type that command at your command prompt and see what happens.
Well?
Nothing happens! If you have done everything properly, the GCC compiler
merely creates the final program file for you. The only time you see a message
that an error occurs in the program.
Running the final result
If you used the proper compiling command, the name of the program to run is
identical to the first part of your source code. So why not run that program!
In Windows, the command to type is
heyworld
In the Unix-like operating systems, you must specify the program’s path or
location before the program name. Type this command:
./heyworld
Press the Enter key and the program runs, displaying this marvelous text on
your screen:
hey world!
Welcome to C language programming!
Advert.