GCC Compiler Interview Preparation Guide Download PDF
GCC Compiler frequently Asked Questions in various Linux GCC Compiler job Interviews by interviewer. The set of questions here ensures that you offer a perfect answer posed to you. So get preparation for your new job hunting
50 Linux GCC Compiler Questions and Answers:
Table of Contents
2 :: Which option of gcc links with a library file?
a) -l
b) -L
c) -link
d) none of the mentioned
a) -l
5 :: The command "as -o google.o google.s" will:
a) generate object file google.o
b) provide an error if google.s exists
c) both (a) and (b)
d) none of the mentioned
a) generate object file google.o
7 :: The -H option of gcc:
a) prints the name of each header file used
b) is used to include header file
c) ignores the header file which are not required by source code
d) none of the mentioned
a) prints the name of each header file used
8 :: The -fPIC option of gcc:
a) generates the position independent code of shared libraries
b) opens the source file in readonly mode
c) both (a) and (b)
d) none of the mentioned
a) generates the position independent code of shared libraries
9 :: What is the job of -Werror option in gcc?
a) it avoids all the errors present in the source code
b) it makes all warnings into errors
c) it stores all the errors of source code into a seperate file
d) none of the mentioned
b) it makes all warnings into errors
13 :: The command "gcc -save-temps google.c" will generate:
a) google.i
b) google.s
c) google.o
d) all of the mentioned
d) all of the mentioned
14 :: 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) both (a) and (b)
d) none of the mentioned
a) source codes can not be compiled with static libraries in gcc
17 :: 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
c) enables extra warning messages
19 :: The command "cpp google.c > google.i" will:
a) create the expanded source code file google.i for the source code file google.c
b) append the content of the google.c into google.i
c) give an error
d) none of the mentioned
a) create the expanded source code file google.i for the source code file google.c
24 :: The -v option of gcc:
a) print the commands executed to run the stages of compilation
b) version of the gcc compiler
c) both (a) and (b)
d) none of the mentioned
a) print the commands executed to run the stages of compilation