Difficulty: Easy
Correct Answer: A-2, B-3, C-3, D-1
Explanation:
Introduction / Context:Classic Pascal provides standard functions with defined argument types. Knowing which functions accept integers, reals, or require angular input in radians is a common programming-language fundamentals topic.
Given Data / Assumptions:
Concept / Approach:Check each function's signature in standard Pascal (e.g., Turbo Pascal, ISO Pascal) and match to the most general argument category presented in the options.
Step-by-Step Solution:
A (ROUND X) → X must be real (fractional allowed) → 2.B (ABS X) → X can be integer or real (overloaded) → 3.C (SQR X) → valid for integer or real (overloaded) → 3.D (SIN X) → X is an angle in radians for trigonometric functions → 1.Verification / Alternative check:In many Pascal dialects: 'ROUND: real → integer; ABS: same type out; SQR: same type out; SIN: real in radians → real.' Example: SIN(pi/2) = 1.0 when X is in radians.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:A-2, B-3, C-3, D-1
Discussion & Comments