GCC Compiler Questions & Answers – Various Options – 3

DigitalOcean Referral Badge DigitalOcean Referral Badge

1.

The command “cpp sanfoundry.c > sanfoundry.i” will

   A.) create the expanded source code file sanfoudry.i for the source code file sanfoundry.c
   B.) append the content of the sanfoundry.c into sanfoundry.i
   C.) give an error
   D.) none of these

Answer: Option 'A'

create the expanded source code file sanfoudry.i for the source code file sanfoundry.c

DigitalOcean Referral Badge

2.

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

Answer: Option 'D'

-Q

DigitalOcean Referral Badge

3.

The -Wextra option of gcc

   A.) is same as -w option
   B.) does not exist
   C.) enables extra warning messages
   D.) none of these

Answer: Option 'C'

enables extra warning messages

DigitalOcean Referral Badge

4.

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 these

Answer: Option 'A'

-pipe option is used

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

5.

Which one of the following is not true?

   A.) source codes can not be compiled with static libraries in gcc
   B.) -O is used for optimization in gcc
   C.) source codes can be compiled
   D.) none of these

Answer: Option 'A'

source codes can not be compiled with static libraries in gcc

DigitalOcean Referral Badge

6.

The command line options of gcc can also be read from a file with

   A.) @
   B.) $
   C.) #
   D.) none of these

Answer: Option 'C'

#

DigitalOcean Referral Badge

7.

Which option of the gcc is used to warn is padding is included in structure?

   A.) -Wpadded
   B.) -Wpad
   C.) -Wpadding
   D.) None of these

Answer: Option 'A'

-Wpadded

DigitalOcean Referral Badge

8.

Which gcc option reports the cpu time taken by each subprocess in the compilation sequence?

   A.) -time
   B.) -cpu
   C.) -process
   D.) none of these

Answer: Option 'A'

-time

DigitalOcean Referral Badge

GCC Compiler Questions & Answers – Various Options – 3 Download Pdf

Recent Posts