This set of Embedded Systems Multiple Choice Questions & Answers focuses on “The Compilation Process-II”.
1. Which of the following are header files?
a) #include
b) file
c) struct()
d) proc()
View Answer
Explanation: The #include is a header file which defines the standard constants, variable types, and many other functions. This can also include some standard libraries.
2. Which is the standard C compiler used for the UNIX systems?
a) simulator
b) compiler
c) cc
d) sc
View Answer
Explanation: The cc is the standard C compiler used in the UNIX system. Its command lines can be pre-processed, compiled, assembled and linked to create an executable file.
3. Which compiling option is used to compile programs to form part of a library?
a) -c
b) -p
c) -f
d) -g
View Answer
Explanation: There are several options for the compilers. The option -c compiles the linking stage and then leaves the object file. This option is used to compile programs to form a part of the library.
4. Which compiling option can be used for finding which part of the program is consuming most of the processing time?
a) -f
b) -g
c) -p
d) -c
View Answer
Explanation: The -p instructs the compiler to produce codes which count the number of times each routine is called and this is useful for finding the processing time of the programs.
5. Which compiling option can generate symbolic debug information for debuggers?
a) -c
b) -p
c) -f
d) -g
View Answer
Explanation: The -g generates the symbolic debug information for the debuggers. Without this, the debugger cannot print the variable values, it can only work at the assembler level. The symbolic information is passed through the compilation process and stored in the executable file.
6. Which of the following is also known as loader?
a) locater
b) linker
c) assembler
d) compiler
View Answer
Explanation: The linker is also known as a loader. It can take the object file and searches the library files to find the routine it calls.
7. Which of the following gives the final control to the programmer?
a) linker
b) compiler
c) locater
d) simulator
View Answer
Explanation: The linker can give the final control to the programmer concerning how unresolved references are reconciled, where the sections are located in the memory, which routines are used, and so on.
8. Which command takes the object file and searches library files to find the routine calls?
a) simulator
b) emulator
c) debugger
d) linker
View Answer
Explanation: The linker is also known as a loader. It can take the object file and searches the library files to find the routine it calls. The linker can give the final control to the programmer concerning how unresolved references are reconciled, where the sections are located in the memory, which routines are used, and so on.
9. Which assembler option is used to turn off long or short address optimization?
a) -n
b) -V
c) -m
d) -o
View Answer
Explanation: The option -o puts the assembler into the file obj file, -V can write the assembler’s version number on the standard error output, -m runs the macro preprocessor on the source file and -n turns off the long or short address optimization.
10. Which assembler option runs the m4 macro preprocessor on the source file?
a) -n
b) -m
c) -V
d) -o
View Answer
Explanation: The option -o puts the assembler into the file obj file, -V can write the assembler’s version number on the standard error output, -m runs the macro preprocessor on the source file and -n turns off the long or short address optimization.
Sanfoundry Global Education & Learning Series – Embedded System.
To practice all areas of Embedded Systems, here is complete set of 1000+ Multiple Choice Questions and Answers.