1. The command “cpp sanfoundry.c > sanfoundry.i” will
a) create the expanded source code file sanfoudry.i for the source code file sanfoundry.c
b) append the content of the sanfoundry.c into sanfoundry.i
c) give an error
d) none of the mentioned
View Answer
Explanation: None.
2. Which option of gcc makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes?
a) -p
b) -P
c) -q
d) -Q
View Answer
Explanation: None.
3. The -Wextra option of gcc
a) is same as -w option
b) does not exist
c) enables extra warning messages
d) none of the mentioned
View Answer
Explanation: None.
4. Which gcc option undefines a preprocessor macro?
a) -U
b) -u
c) -undefine
d) none of the mentioned
View Answer
Explanation: None.
5. Pipes are used rather than temporary files for communication between the various stages of compilation in gcc when
a) -pipe option is used
b) -temp option is used
c) –disable -temp option is used
d) none of the mentioned
View Answer
Explanation: None.
6. The gcc option -Wunused warns when a _____ variable is unused aside from its declaration.
a) variable
b) function
c) macro
d) none of the mentioned
View Answer
Explanation: None.
7. Which one of the following is not true?
a) source codes can not be compiled with static libraries in gcc
b) -O is used for optimization in gcc
c) source codes can be compiled
d) none of the mentioned
View Answer
Explanation: None.
8. The command line options of gcc can also be read from a file with
a) @
b) $
c) #
d) none of the mentioned
View Answer
Explanation: None.
9. Which option of the gcc is used to warn is padding is included in structure?
a) -Wpadded
b) -Wpad
c) -Wpadding
d) None of the mentioned
View Answer
Explanation: None.
10. Which gcc option reports the cpu time taken by each subprocess in the compilation sequence?
a) -time
b) -cpu
c) -process
d) none of the mentioned
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.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Practice Programming MCQs
- Check Information Technology Books
- Apply for Programming Internship
- Check Linux Books