adplus-dvertising
frame-decoration

Question

What will be the output of the given code snippet below?
{
    delegate void A(ref string str);
    class sample
    {
        public static void fun( ref string a)
        {
            a = a.Substring( 7, a.Length - 7);
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            A str1;
            string str = "Test Your C#.net skills";
            str1 = sample.fun;
            str1(ref str);
            Console.WriteLine(str);
        }
    }
}

a.

Test Your

b.

ur C#.NET

c.

ur C#.NET Skills

d.

None of the mentioned

Answer: (c).ur C#.NET Skills

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the given code snippet below?