CS 240 Exam 1|54 Questions with 100% Correct Answers | Verified | Updated 2024
Write the command to compile a single C file named "hello.c" into an object file called "hello.o". - ️️$ gcc -c hello.c Write the command to link two object files named "hello.o" and "goodbye.o" into the executable called "application". - ️️$ gcc -o application hello.o goodbye.o Can you "run" an object file if it contains the "main()" function? - ️️No Can you "run" an executable that contains a single function called "main()"? - ️️Yes Can you "run" an executable that does not contain a function called "main()"? - ️️No What does the "-Wall" flag do? - ️️Enable ALL warnings What does the "-g" flag do? - ️️include debug symbols What does the "-ansi" flag do? - ️️Adhere to the ANSI standard What does the "-c" flag do? - ️️compile file into object code What does the "-o" flag do? - ️️output to file What does the "-Werror" flag do? - ️️Turn warnings into errors
Written for
- Institution
- CS 240
- Course
- CS 240
Document information
- Uploaded on
- March 2, 2024
- Number of pages
- 14
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal