Examveda

What does the "splat" operator (*) do when used in method definitions in Ruby?

A. It allows a method to accept a variable number of arguments as an array

B. It repeats a block of code a specified number of times

C. It creates a shallow copy of an array or hash

D. It performs a bitwise operation on a numerical value

Answer: Option A


This Question Belongs to Ruby Programming >> Advanced Topics In Ruby

Join The Discussion

Related Questions on Advanced Topics in Ruby