LearnFrenzy
Sign in Take a free test

Variable Number of Arguments · Variable Arguments MCQ · Question 2

Where must the ellipsis appear in a parameter list? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 2 Back to Exercise

Where can ... appear in a function's parameter list?

  • A Only as the last item Correct
  • B Anywhere
  • C Only as the first item
  • D Only in main()
Correct Answer: Option A

Named parameters come first, then the ellipsis. int f(..., int n) is a syntax error.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links