1. Which one of the following command creates the executable file a.out?
a) gcc -o sanfoundry.c
b) gcc sanfoundry.c
c) gcc -o a.out
d) gcc a.out
View Answer
Explanation: None.
2. If we compile the sanfoudry.c file with the command “gcc -o sanfoundry sanfoundry.c”, then the executable file will be
a) a.out
b) sanfoundry
c) sanfoundry.out
d) none of the mentioned
View Answer
Explanation: None.
3. If we compile the sanfoundry.c file with the command “gcc -c sanfoundry.c”, then the output file will be
a) sanfoundry.o
b) sanfoundry.s
c) sanfoundry.i
d) none of the mentioned
View Answer
Explanation: None.
4. Which gcc option includes debugging info in the generated object code?
a) -g
b) -c
c) -p
d) none of the mentioned
View Answer
Explanation: None.
5. The command “gcc -S sanfoundry.c” will
a) stop compilation process after the generation of assembly code file
b) generate sanfoundry.s file
c) stop compilation process after the generation of assembly code file & generate sanfoundry.s file
d) none of the mentioned
View Answer
Explanation: None.
6. Which gcc option stops compilation process after preprocessing stage?
a) -e
b) -f
c) -E
d) -F
View Answer
Explanation: None.
7. The -v option of gcc
a) print the commands executed to run the stages of compilation
b) version of the gcc compiler
c) all of the mentioned
d) none of the mentioned
View Answer
Explanation: None.
8. Which gcc option turns off certain features of gcc that are incompatible with ISO C89?
a) -ansi
b) -ISO
c) -ver
d) none of the mentioned
View Answer
Explanation: None.
9. The option -fsyntax-only of gcc
a) checks the code for syntax error
b) checks the code for fatal error
c) checks the code for syntax & fatal error
d) none of the mentioned
View Answer
Explanation: None.
10. Which option of gcc inhibit all warning messages?
a) -w
b) -x
c) -y
d) -z
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – Linux Administration & Programming.
Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.
To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.
- Check Information Technology Books
- Check Linux Books
- Practice Programming MCQs
- Apply for Programming Internship