Home / MCQ Bank / Computer
Computer Blocks And Procs In Ruby Difficulty: Medium

How do you pass a proc as an argument to a method in Ruby?

Select the correct option to test your answer:

More Computer Questions

What will be the output of the following Python code? for i in range(float('inf')): print (i) A graph has 20 vertices. The maximum number of edges it can have is? (Given it is bipartite) Which of the following will compile the Pigunit? What will be the output of the following C# code snippet? static void Main(string[] args) { Console.Write("c"); Console.Write("sharp" ); Console.ReadLine(); } What will be the output of the following C# code snippet? class Program { static void Main(string[] args) { string[] strs = { ".com", ".net", "facebook.com", "google.net", "test", "netflix.net", "hsNameD.com" }; var netAddrs = from addr in strs where addr.Length > 4 && addr.EndsWith(".net", StringComparison.Ordinal) select addr; foreach (var str in netAddrs) Console.WriteLine(str); Console.ReadLine(); } }