Bird
0
0

Which of the following commands runs the preprocessor only in GCC?

easy📝 Syntax Q12 of 15
C - Basics and Execution Environment
Which of the following commands runs the preprocessor only in GCC?
Agcc -o file file.c
Bgcc -c file.c
Cgcc -S file.c
Dgcc -E file.c
Step-by-Step Solution
Solution:
  1. Step 1: Identify GCC flags for compilation steps

    The flag '-E' tells GCC to run only the preprocessor and output the result.
  2. Step 2: Understand other flags

    '-c' compiles to object code, '-S' compiles to assembly, and '-o' specifies output file name.
  3. Final Answer:

    gcc -E file.c -> Option D
  4. Quick Check:

    Preprocessor only = gcc -E [OK]
Quick Trick: Use gcc -E to run only the preprocessor [OK]
Common Mistakes:
  • Confusing -E with -c or -S
  • Using -o without understanding its purpose
  • Assuming -c runs the preprocessor only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes