πŸ“Š Ruby
Q. What is the main difference between a lambda and a Proc in Ruby?
  • (A) Procs can be converted to lambdas, but lambdas cannot be converted to Procs
  • (B) Lambdas are objects of the Proc class, while Procs are not
  • (C) Lambdas enforce strict argument checking, while Procs do not
  • (D) Procs can accept a variable number of arguments, while lambdas cannot
πŸ’¬ Discuss
βœ… Correct Answer: (C) Lambdas enforce strict argument checking, while Procs do not

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
214
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate