C MCQ Questions and Answers on C Program Build Process

Image
C MCQ Questions and Answers

Study C MCQ Questions and Answers on C Program Build Process. Easily attend technical job interviews with these Multiple Choice Questions.

Go through C Theory Notes on Build Process before studying these questions.



1) What is the input file in a C program building process.?
A) filename.k
B) filename.cpp
C) filename.c
D) filename.p
Answer [=]
C
Explanation:

Obviously, it is a C file with some code.

2) What is the output Filename of C Program build process.?
A) filename.ex
B) filename.bak
C) filename.exe
D) filename.asm
Answer [=]
C
Explanation:

Yes. One Exe file with the same name as .C file will be created.

3) What is the first step in C program building process.?
A) Compiling
B) Assembling
C) Linking
D) Preprocessing
Answer [=]
D
Explanation:

Preprocessing deals with #define macros, #pragma, #include and other commands.

4) What is the next step to Preprocessing in C Program build process.?
A) Compiling
B) Assembling
C) Linking
D) None of the above
Answer [=]
A
5) What is the next step to Compiling in C program build process.?
A) Preprocessing
B) Assembling
C) Linking
D) None of the above
Answer [=]
B
Explanation:

An assembler converts Assembly code from compiler and converts it to Object code or machine code.

6) What is the next step to Assembling in C program build process.?
A) Preprocessing
B) Compiling
C) Linking
D) None of the above
Answer [=]
C
Explanation:

Linking combines our C file object code and predefined library functions object code into a single exe file.

7) What is a C Editor.?
A) A C compiler
B) A C assembler
C) A C code editor like notepad
D) None of the above
Answer [=]
C
Explanation:

You can any editor for typing and editing C code.



8) What is the output of C Compiler compiling.?
A) An assembly language code
B) Object Code
C) Class file code
D) None of the above
Answer [=]
A
9) Expanded Source code is the output of which C program building process.?
A) Preprocessor
B) Assembler
C) Linker
D) Compiler
Answer [=]
A
Explanation:

Source code is expanded with suitably replacing Macro Names (eg. CVV or PI) with Values or Expressions (eg. 3.14 or 2*x+y).

10) Choose a correct statement about C program output file.?
A) Output file .exe is machine dependent. .Exe is windows suitable file.
B) Exe file does not work in Linux or Unix machines. So different type of output is created on different machines
C) Linker produces a suitable output file for each maching
D) All the above
Answer [=]
D