CS 240 Exam 1 with Latest Questions and Accurate Answers Graded A Plus
CS 240 Exam 1 with Latest Questions and Accurate Answers Graded A Plus Write the command to compile a single C file named "hello.c" into an object file called "hello.o". ANSWER $ gcc -c hello.c Write the command to link two object files named "hello.o" and "goodbye.o" into the executable called "application". ANSWER $ gcc -o application hello.o goodbye.o Can you "run" an object file if it contains the "main()" function? ANSWER No Can you "run" an executable that contains a single function called "main()"? ANSWER Yes Can you "run" an executable that does not contain a function called "main()"? ANSWER No What does the "-Wall" flag do? ANSWER Enable ALL warnings What does the "-g" flag do? ANSWER include debug symbols What does the "-ansi" flag do? ANSWER Adhere to the ANSI standard What does the "-c" flag do? ANSWER compile file into object code What does the "-o" flag do? ANSWER output to file
Written for
- Institution
- CS 240
- Course
- CS 240
Document information
- Uploaded on
- April 23, 2024
- Number of pages
- 15
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- gcc c helloc
-
cs 240 exam with questions and answers
-
command to compile a single c file named helloc
-
command to link two object files named helloo a
-
gcc o application helloo goodbyeo