PCEP-30-02 · Question #182
Which of the following enclose the input parameters or arguments of a function?
The correct answer is D. Parentheses. Parentheses () are used universally across programming languages to enclose the input parameters or arguments of a function - for example, greet("Alice") or add(2, 3). Brackets [] are used for array indexing or list literals, not function calls. Quotation marks "" or '' delimit…
Question
Options
- ABrackets
- BQuotation marks
- CCurly braces
- DParentheses
How the community answered
(22 responses)- A9% (2)
- B14% (3)
- C5% (1)
- D73% (16)
Explanation
Parentheses () are used universally across programming languages to enclose the input parameters or arguments of a function - for example, greet("Alice") or add(2, 3). Brackets [] are used for array indexing or list literals, not function calls. Quotation marks "" or '' delimit string values, not function syntax. Curly braces {} define code blocks, object literals, or dictionaries.
Memory tip: Think of parentheses as the function's "arms" reaching out to receive what you hand it - you always pass something into the function through ().
Community Discussion
No community discussion yet for this question.