Home > OS >  GCC compiler
GCC compiler

Time:11-22

Write two C language source file thanks1. C and thanks2. C, program content is as follows:
Thanks1. C
# include
Int main (void) {
Printf (" hello world! \n");
Thanks2 ();
}
Thanks2. C
# include
Void thanks2 (void) {
Printf (" thank you very much! \n");
}
Then use the GCC compiler, to achieve thanks1 and thanks2 two c language file to compile and link, thanks to generate an executable file, and execute thanks program, print program is running as a result,

CodePudding user response:

GCC thanks1. C thanks2. C
./a.out

CodePudding user response:

 
# include

Void thanks2 (void)
Int main (void)
{
Printf (" hello world! \n");
Thanks2 ();
}

Statement about solve the warning

CodePudding user response:

Join the ";"
Void thanks2 (void);

CodePudding user response:

GCC thanks1. C thanks2. C - o thanks
Chmod + x thanks
./thanks
  • Related