Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Device DriversLinux OS ManagementLinux MakefileLinux EnvironmentLinux OS Shell Interviews Quizzes

Accounts

AccountingAccounts PayableAuditJunior AccountantSenior Accountant

Analysis

Data AnalystFinancial AnalystGISGIS AnalysisStatistics

Banking

ICICI Bank LtdLoan OfficerRecovery OfficerTreasuryUnderwriter

Basic Job

BehavioralBusiness intelligenceFreshers GraduatePuzzlesTargeted Selection

Best Engineering

Automobile EngineeringChemical EngineeringCivil EngineeringElectrical EngineeringMechanical Engineering

Best Multimedia

3D AnimationCoreldrawDesign EngineerGraphics DesignerInterior Design

Community

Cable OperatorFirefighter SpecialistFuneral DirectorSpeech PathologistTranslator

New Artist

Art DirectorAstrologistInternational RelationshipSociologyVisual Arts

9th Class

9th Class Biology9th Class Chemistry9th Class Computer Studies9th Class Pakistan StudiesEnglish Grammar Section 9th Class

Accounting

Accounting ManagementBank Probationary Officer (PO)Financial Accounting Exam MCQsManagerial Accounting Exam MCQs

Civil Engineering

Building ConstructionRailwaysRCC Structures DesignSoil Mechanics and Foundation EngineeringSurveying

Engineering

Electrical EngineeringElectronic DevicesElectronics EngineeringEngineering MechanicsSoftware Engineering

General Knowledge (GK)

General Knowledge (GK)IQ (Intelligence Quotient)Permutation And CombinationPhysical CommunicationVocabulary

Information Technology (IT)

Basics of ComputerComputer KnowledgeComputer OrganizationFundamentals Of ComputerWireless Communication

Networking

Advanced NetworkingBasic NetworkingComputer Networks TestNetwork SecurityNetworking

Soft Skills Quizzes MCQs

Communication Skills Exam MCQsCorporate Communication Exam MCQsLeadership Skills Exam MCQsNegotiation Skills Exam MCQsTime Management Exam MCQs

Linux OS Interviews

Awk Programming IQBash Arithmetic Expressions IQDevice Drivers IQGCC Compiler IQLinux Administrator IQLinux Commands IQLinux Debugging IQLinux Environment IQLinux General IQLinux IPC IQLinux Makefile IQLinux OS IQLinux OS Editors IQLinux OS Management IQLinux OS Shell IQLinux Proc Filesystem IQLinux Search Pattern IQLinux Shared & Static Libraries IQLinux Socket Programming IQLinux Startup and Shutdown IQLinux Sysfs IQLinux Systems IQLinux Threads IQLinux Ubuntu IQSignal Handling IQSystem Calls IQ

Operational GCC Compiler Interview Questions & Answers:

1. The correct sequence of GCC compilation process is:
a) preprocessing -> compilation -> assemble -> linking
b) assemble -> preprocessing -> compilation -> linking
c) preprocessing -> assemble -> compilation -> linking
d) none of the mentioned

a) preprocessing -> compilation -> assemble -> linking

2. What is the role of linker in the compilation process?
a) linker links the object code with the library code
b) linker converts machine code into executable machine code
c) linker generates an executable file
d) all of the mentioned

d) all of the mentioned

3. The compiler converts:
a) assembly code into machine code
b) preprocessed source code into assembly code
c) machine code into assembly code
d) none of the mentioned

b) preprocessed source code into assembly code

4. The a.out file is in the:
a) ELF format
b) EXE format
c) both (a) and (b)
d) none of the mentioned

a) ELF format

5. The preprocessor creates the file with extension:
a) .a
b) .i
c) .s
d) .o

b) .i

6. The macros specifies in source code are expanded by:
a) pre-processor
b) assembler
c) compiler
d) linker

a) preprocessor

7. If we do not specify the executable file name at the compilation time in GCC, then in linux the compiler creates executable named as:
a) a.out
b) a.exe
c) x.out
d) x.exe

a) a.out

8. The object file contains the:
a) assembly code
b) machine code
c) modified source code
d) none of the mentioned

b) machine code

9. If google.c is compiled with GCC, then the google.s file will contain the:
a) assembly code
b) machine code
c) preprocessed code
d) expanded source code

a) assembly code

10. The assembly code is converted into the machine code by:
a) compiler
b) assembler
c) linker
d) none of the mentioned

b) assembler

11. The preprocessor removes the _______ from the source code.
a) comments
b) header files
c) both (a) and (b)
d) none of the mentioned

a) comments

12. Which one of the following command can be used to provide executable permissions for a file?
a) chmod +x
b) chmod 777
c) both (a) and (b)
d) none of the mentioned

c) both (a) and (b)

13. Command line parameters are passed by the:
a) preprocessor
b) assembler
c) compiler
d) linker

d) linker

14. Which compilation step makes sure that all the undefined symbols in the code are resolved?
a) linking
b) compiling
c) preporcessing
d) none of the mentioned

a) linking
Explanation:
An undefined symbol is one for which there is no definition available.

15. Which one of the following is not true?
a) we need to manually go through all intermediate stages to generate an executable in gcc
b) gcc compilation process always contains 4 stages
c) both (a) and (b)
d) none of the mentioned

a) we need to manually go through all intermediate stages to generate an executable in gcc

16. The COFF stands for:
a) common object file format
b) combined operation for file formats
c) combined object file format
d) none of the mentioned

a) common object file format

17. The lines in our code that begin with the "#" character are:
a) pre-processor directives
b) macros
c) header files
d) none of the mentioned

a) preprocessor directives

18. In the pre-processing stage of compilation:
a) header files are actually expanded and included in the source code of the program
b) macros are replaced by their respective values
c) all the comments are stripped off
d) all of the mentioned

d) all of the mentioned

19. Preprocessed files are given the file extension _____ for c++ programs.
a) .i
b) .ii
c) .iii
d) none of the mentioned

b) .ii

20. Which gcc option turns off certain features of gcc that are incompatible with ISO C89?
a) -ansi
b) -ISO
c) -ver
d) none of the mentioned

a) -ansi

21. The command "gcc -S google.c" will:
a) stop compilation process after the generation of assembly code file
b) generate google.s file
c) both (a) and (b)
d) none of the mentioned

c) both (a) and (b)

22. The assembly code generated depends upon the:
a) processor architecture
b) RAM size
c) both (a) and (b)
d) none of the mentioned

c) both (a) and (b)

23. Which option of gcc inhibit all warning messages?
a) -w
b) -x
c) -y
d) -z

a) -w

24. Which gcc option stops compilation process after preprocessing stage?
a) -e
b) -f
c) -E
d) -F

c) -E

25. Pipes are used rather than temporary files for communication between the various stages of compilation in gcc when:
a) -pipe option is used
b) -temp option is used
c) -disable -temp option is used
d) none of the mentioned

a) -pipe option is used

26. The option -fsyntax-only of gcc:
a) checks the code for syntax error
b) checks the code for fatal error
c) both (a) and (b)
d) none of the mentioned

a) checks the code for syntax error

27. 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

28. If we compile the google.c file with the command "gcc -c google.c", then the output file will be:
a) google.o
b) google.s
c) google.i
d) none of the mentioned

a) google.o

29. If we compile the google.c file with the command "gcc -o google google.c", then the executable file will be:
a) a.out
b) google
c) google.out
d) none of the mentioned

b) google

30. Which gcc option includes debugging info in the generated object code?
a) -g
b) -c
c) -p
d) none of the mentioned

a) -g

31. Which one of the following command creates the executable file a.out?
a) gcc -o google.c
b) gcc google.c
c) gcc -o a.out
d) gcc a.out

b) gcc google.c

32. 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

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?
a) -p
b) -P
c) -q
d) -Q

d) -Q

34. 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

35. Which gcc option undefined a pre-processor macro?
a) -U
b) -u
c) -undefine
d) none of the mentioned

a) -U



SHARE




FORUM
PRIVACY
TERMS & CONDITIONS
FEED BACK

Submit Your Feedback:


×

Thank You For Your Feedback!

Your message has been sent successfully.

Disclaimer
Interview Questions Answers .ORG is responsive and optimized web portal for individuals to get preparation for their job interviews, learning and training. Content at Interview Questions Answers .ORG might be simplified to improve our users experience. We constantly review our content to avoid errors and copyright violations, but we cannot warrant full correctness of all the content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.

Interview Questions Answers .ORG
Face Book Twitter Linkedin