UTERMINAL
TERMINAL
NEXT
$V1$
PAUSE
CLEAN
ENCORE
BOX
ILLUSTRATION
GO
Assume that there are three separate functions:
funct_1()
{
--------
--------
}
main()
{
:--;
:---;
}
funct_2()
{
---;
}
These functions may be compiled separately with:
cc -c main.c cc -c funct_1.c cc -c funct_2.c
To produce an executable image called myprog from the three
source files main.c, func1.c, and func2.c
one would type:
cc -o myprog main.c func1.c func2.c
Let's review compiling and running a C program.
To produce an executable image called myprog from the three
object files main.o, func1.o, func2.o you would enter:
Answer here:
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please try again, using the -o flag and 3 object files.
Try cc -o myprog main.o func1.o ...
Please review How to Run a C Program in Lesson 1
FORGET1
The answer is cc -o myprog main.o func1.o func2.o
Enter the command to execute the program myprog
$PROMPT$
That is correct!
You've got it on the 2nd try.
You've got it finally!
All you need to type is the name of the program!
Please enter the name of the program.
Please review How to Run a C Program in Lesson 1
$PROMPT$
FORGET5
The correct answer is myprog !
$PROMPT$
myprog
program output ...
$PROMPT$