This set of Embedded Systems Multiple Choice Questions & Answers (MCQs) focuses on “The Compilation Process”.
1. Which of the following function can interpret data in the C language?
a) printf
b) scanf
c) proc
d) file
View Answer
Explanation: The scanf and printf are the well-known functions in the C language which is used to interpret data and print data respectively.
2. What is the first stage of the compilation process?
a) pre-processing
b) post-processing
c) compilation
d) linking
View Answer
Explanation: The pre-processing involves the first stage of the compilation process in which the include files are added. This file defines the standard functions, constants etc and the output is fed to the compiler.
3. Which of the following produces an assembler file in the compilation process?
a) pre-processor
b) assembler
c) compiler
d) post-processing
View Answer
Explanation: The output of the pre-processor is given to the compiler in which it produces an assembler file from the instruction codes of the processor.
4. Which file is converted to an object file?
a) hex file
b) decoded file
c) coded file
d) assembly file
View Answer
Explanation: The output of the pre-processor is given to the compiler which produces an assembler file from the instruction codes of the processor and this possesses libraries. The assembly file is then converted into the object file and this contains the hexadecimal coding.
5. Which of the following contains the hexadecimal coding?
a) object file
b) assembly file
c) coded file
d) decoded file
View Answer
Explanation: The output of the pre-processor is given to the compiler which produces an assembler file from the instruction codes of the processor and this possesses libraries and then these assembly file is converted into the object file and this possesses the coding of hexadecimal.
6. Which of the following processes the source code before it goes to the compiler?
a) compiler
b) simulator
c) pre-processor
d) emulator
View Answer
Explanation: The pre-processor is responsible for processing the source code before it goes to the compiler and this in turn allows the programmer to define variable types, constants, and much other information.
7. Which of the following allows the programmer to define constants?
a) pre-processor
b) compiler
c) emulator
d) debugger
View Answer
Explanation: The pre-processor processes the source code before it goes to the compiler and this allows the programmer to define variable types, constants, and much other information.
8. Which statement replaces all occurrences of the identifier with string?
a) # define identifier string
b) # include
c) # define MACRO()
d) # ifdef
View Answer
Explanation: # define statement can replace all occurrences of the identifier with string. Similarly, it is able to define the constants, which also make the code easier to understand.
9. Which of the following has the include file?
a) emulator
b) debugger
c) pre-processor
d) simulator
View Answer
Explanation: The pre-processor produces the source code before it goes to the compiler and this allows the programmer to define variable types, constants, and much other information. This pre-processor also has to include files and combines them into the program source.
10. Which statement is used to condense the code to improve the eligibility?
a) # define MACRO()
b) # include
c) if
d) else-if
View Answer
Explanation: The # define MACRO() statement is used to condense the code for improving the code eligibility or for space reasons.
Sanfoundry Global Education & Learning Series – Embedded System.
To practice all areas of Embedded System, here is complete set of 1000+ Multiple Choice Questions and Answers.