Swift - Data TypesWhy is Swift considered strongly typed even though it supports type inference?ABecause it never requires specifying types explicitlyBBecause it ignores types during compilationCBecause it always knows the exact type at compile timeDBecause it allows variables to change types dynamicallyCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand type inferenceSwift can guess the type from the assigned value without explicit annotation.Step 2: Recognize strong typing with inferenceEven with inference, Swift knows the exact type at compile time and enforces it.Final Answer:Because it always knows the exact type at compile time -> Option CQuick Check:Type inference still enforces strong typing [OK]Quick Trick: Inference guesses type but keeps strong typing [OK]Common Mistakes:Confusing inference with dynamic typingThinking types are optional or ignoredBelieving variables can change type after inference
Master "Data Types" in Swift9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Swift Quizzes Data Types - Typealias for custom naming - Quiz 7medium Functions - Functions as types - Quiz 14medium Loops - For-in loop with collections - Quiz 5medium Loops - For-in loop with collections - Quiz 15hard Operators and Expressions - Comparison operators - Quiz 6medium Operators and Expressions - Comparison operators - Quiz 8hard Swift Basics and Runtime - Main entry point and @main attribute - Quiz 5medium Swift Basics and Runtime - Main entry point and @main attribute - Quiz 3easy Variables and Constants - String interpolation - Quiz 10hard Variables and Constants - Explicit type annotation - Quiz 12easy