C - Basics and Execution EnvironmentWhy is the return type of main() usually int in C programs?ATo print output on the screenBTo indicate program exit status to the operating systemCTo declare global variablesDTo include header filesCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand main() return type purposeint return type allows main() to return an exit status code to the OS.Step 2: Eliminate incorrect optionsPrinting output, declaring variables, and including headers are unrelated to return type.Final Answer:To indicate program exit status to the operating system -> Option BQuick Check:int main() return = exit status [OK]Quick Trick: int main() returns exit code to OS [OK]Common Mistakes:Thinking return type prints outputConfusing return type with variable declaration
Master "Basics and Execution Environment" in C9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More C Quizzes C Basics and Execution Environment - Header files and include directive - Quiz 10hard C Basics and Execution Environment - Why C is widely used - Quiz 12easy Conditional Statements - Nested conditional statements - Quiz 2easy Input and Output - Multiple input and output - Quiz 1easy Loops - Nested loops - Quiz 4medium Loops - Why loops are needed - Quiz 1easy Operators and Expressions - Logical operators - Quiz 9hard Operators and Expressions - Ternary operator - Quiz 6medium Variables and Data Types - Why variables are needed - Quiz 8hard Variables and Data Types - Type modifiers - Quiz 15hard