C - Basics and Execution EnvironmentWhat is wrong with this command?gcc -S file.o -o file.sAMissing -c flag for compilationBCannot generate assembly from object fileCOutput file name should be file.oDgcc does not support -S optionCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand -S option'-S' generates assembly code from source, not from object files.Step 2: Check input file typeInput 'file.o' is object code; cannot be converted back to assembly with gcc -S.Final Answer:Cannot generate assembly from object file -> Option BQuick Check:-S requires source, not object file [OK]Quick Trick: -S works on source, not object files [OK]Common Mistakes:Trying to assemble from object filesConfusing -S with -cAssuming gcc can reverse object to assembly
Master "Basics and Execution Environment" in C9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More C Quizzes Conditional Statements - Switch vs if comparison - Quiz 11easy Conditional Statements - If–else statement - Quiz 2easy Conditional Statements - If–else statement - Quiz 9hard Conditional Statements - Nested conditional statements - Quiz 13medium Input and Output - Format specifiers - Quiz 9hard Loop Control Statements - Why loop control is required - Quiz 8hard Loops - Why loops are needed - Quiz 8hard Loops - Loop execution flow - Quiz 3easy Loops - Do–while loop - Quiz 11easy Variables and Data Types - Type modifiers - Quiz 9hard