As we type “make†command on the terminal
1.make reads the makefile in the current directory
2.make reads the makefile in the parent directory
3.make reads the makefile in the predefined environment variable
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
 Which option of gcc enables compiler’s all warning messages?
1.-Wall
2.-War
3.-Warn
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
hat is the job of -Werror option in gcc?
1.it avoids all the errors present in the source code
2.it makes all warnings into errors
3.it stores all the errors of source code into a seperate file
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
If make command is executed as “make -j 2â€, then
1.two jobs will run simultaneously
2.only two will be executed
3.it will give an error
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
If our makefile is named as “sanfoundryâ€, then which one of the following command will compile the code with this makefile
1.make -a sanfoundry
2.make -f sanfoundry
3.make sanfoudry
4.make
Posted Date:-2021-06-30 09:16:33
If we compile the sanfoudry.c file with the command “gcc -o sanfoundry sanfoundry.câ€, then the executable file will be
1.a.out
2.sanfoundry
3.sanfoundry.out
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
If we compile the sanfoundry.c file with the command “gcc -c sanfoundry.câ€, then the output file will be
1.sanfoundry.o
2.sanfoundry.s
3.sanfoundry.i
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
If we want to execute the makefile by just giving the “make†command, makefile should be named as
1.Makefile
2.makefile
3.MAKEFILE
4.None of the mentioned
Posted Date:-2021-06-30 09:16:33
If we want to get the exit status that specified targets are up to date or not, we have to execute the make command with option
1.-q
2.-r
3.-s
4.-t
Posted Date:-2021-06-30 09:16:33
In makefile the comment begins with the character
1.$
2.#
3./*
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
In the makefile the target and dependencies are separated by the character
1.–
2.:
3. /
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Macros for the makefile can be defined in
1.makefile
2.command line
3.both makefile and command line
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Pipes are used rather than temporary files for communication between the various stages of compilation in gcc when
1.-pipe option is used
2.-temp option is used
3.–disable -temp option is used
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Running “make†command without the arguments starts the target ____ in the makefile.
1.“.phonyâ€
2.“cleanâ€
3. first
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The -fPIC option of gcc
1.generates the position independent code of shared libraries
2.opens the source file in readonly mode
3.opens the source file
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The -H option of gcc
1.prints the name of each header file used
2.is used to include header file
3. ignores the header file which are not required by source code
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The -shared option of gcc generates shared ______ for shared library.
1.object file
2.preprocessed file
3.source file
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The -v option of gcc
1.print the commands executed to run the stages of compilation
2.version of the gcc compiler
3.all of the mentioned
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The -Wextra option of gcc
1.is same as -w option
2.does not exist
3.enables extra warning messages
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The command “as -o sanfoundry.o sanfoundry.s†will
1.generate object file sanfoundry.o
2.provide an error if sanfoundry.s exists
3.generate object file sanfoundry.o & provide an error if sanfoundry.s exists
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The command “cpp sanfoundry.c > sanfoundry.i†will
1.create the expanded source code file sanfoudry.i for the source code file sanfoundry.c
2.append the content of the sanfoundry.c into sanfoundry.i
3.give an error
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The command “gcc -S sanfoundry.c†will
1.stop compilation process after the generation of assembly code file
2.generate sanfoundry.s file
3.stop compilation process after the generation of assembly code file & generate sanfoundry.s file
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The command “gcc -save-temps sanfoundry.c†will generate
1.sanfoundry.i
2.sanfoundry.s
3.sanfoundry.o
4.all of the mentioned
Posted Date:-2021-06-30 09:16:33
The command “make sanfoundry†will
1.create the executable if sanfoundry.c file is present in the current directory
2.create the object file named as sanfoundry.o
3.give an error
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The command line options of gcc can also be read from a file with
1.@
2.$
3.#
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The gcc option -Wunused warns when a _____ variable is unused aside from its declaration.
1.variable
2.function
3.macro
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The makefile starts executing from
1.first target
2.first target whose name starts with “.â€
3.first target whose name does not starts with “.â€
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
The option -fsyntax-only of gcc
1.checks the code for syntax error
2. checks the code for fatal error
3.checks the code for syntax & fatal error
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
What is makefile?
1.makefile describes to the make command that how to compile the program
2.makefile contains various statements related with the compilation of target
3.makefile contains various statements
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
What is phony target in the makefile?
1.the target which is not a filename
2.the target which is a filename
3.the target which does not used for compilation
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
When a target of makefile fails to execute
1.make does not executes any other target dependent on it
2.it returns a status
3.make does not executes any other target dependent on it & it returns a status
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which gcc option includes debugging info in the generated object code?
1.-g
2.-c
3.-p
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which gcc option reports the cpu time taken by each subprocess in the compilation sequence?
1.-time
2. -cpu
3.-process
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which gcc option stops compilation process after preprocessing stage?
1.-e
2.-f
3.-E
4.-F
Posted Date:-2021-06-30 09:16:33
Which gcc option turns off certain features of gcc that are incompatible with ISO C89?
1.-ansi
2.-ISO
3.-ver
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which gcc option undefines a preprocessor macro?
1.-U
2.-u
3.-undefine
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which make command option ignores all errors in commands executed to remark files?
1.-i
2.-j
3.-k
4.None
Posted Date:-2021-06-30 09:16:33
Which one of the following can be used to specify the directory to search the dependencies and target files?
1.VPATH
2.CPATH
3.FPATH
4.None of the mentioned
Posted Date:-2021-06-30 09:16:33
Which one of the following command creates the executable file a.out?
1.gcc -o sanfoundry.c
2.gcc sanfoundry.c
3.gcc -o a.out
4.gcc a.out
Posted Date:-2021-06-30 09:16:33
Which one of the following is not a valid makefile directive?
1. if
2.elif
3.endif
4. none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which one of the following is not true?
1.source codes can not be compiled with static libraries in gcc
2. -O is used for optimization in gcc
3.source codes can be compiled
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which one of the following is used for the target filename in the makefile?
1.$@
2.$*
3.$?
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which one of the following provides all dependencies in the makefile?
1.$^
2.$*
3.$:
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which option of gcc adds include directory of header files?
1.-i
2.-I
3.-e
4.-E
Posted Date:-2021-06-30 09:16:33
Which option of gcc inhibit all warning messages?
1.-w
2.-x
3.-y
4.-z
Posted Date:-2021-06-30 09:16:33
Which option of gcc links with a library file?
1.-l
2.-L
3.-e
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
Which option of gcc looks in the provided directory for library files?
1.-l
2.-L
3.-link
4.none of the mentioned
Posted Date:-2021-06-30 09:16:33
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?
1.-p
2.-P
3.-q
4.-Q
Posted Date:-2021-06-30 09:16:33
Which option of make command print the commands that would be executed, but do not execute them?
1.-m
2.-n
3.-o
4.-p
Posted Date:-2021-06-30 09:16:33
Which option of the gcc is used to warn is padding is included in structure?
1.-Wpadded
2.-Wpad
3.-Wpadding
4.None of the mentioned
Posted Date:-2021-06-30 09:16:33