1.
In .NET, which of the following queries will work for the following code:

using System;
using System.Linq;

class Program {
    static void Main(string[] args) {
        int[] nums = {
            1, -2, 3, 0, -4, 5
        };
        int len = /*_________________ */
            Console.WriteLine("The number of positive values in nums: " + len);
    }
}
2.
What is the output of the following .NET code:

using System;
using System.Linq;

class Program {
    static void Main(string[] args) {
        int[] x = {
            1, -2, 3, 10, -4, 5
        };
        var posNums = x.Where(n => n < 10).Select(r => r % 3);
        Console.Write("The selected values are: ");
        foreach(int i in posNums)
        Console.Write(i + " ");
    }
}
3.
What is the output of the following .NET code:

using System;
using System.Linq;

class Program {
    static void Main(string[] args) {
        string[] r1 = {
            ".com",
            ".net",
            "facebook.com",
            "google.net",
            "test",
            "netflix.net",
            "hsNameD.com"
        };
        var netAddrs = from addr in r1
        where addr.Length > 4 && addr.EndsWith(".net",
            StringComparison.Ordinal)
        select addr;
        foreach(var str in netAddrs)
        Console.WriteLine(str);
    }
}
4.
What is the output of the following .NET code:

using System;
using System.Net;

delegate void DelegateFunc(ref string s1);

class Sample {
    public static void NewSubString(ref string str) {
        str = str.Substring(7, str.Length - 7);
    }
}

class Program {
    static void Main(string[] args) {
        DelegateFunc delFunc;
        string str = "Test Your C#.net skills";
        delFunc = Sample.NewSubString;
        delFunc(ref str);
        Console.WriteLine(str);
    }
}
5.
What is the output of the following .NET code:

using System;
using System.Net;

delegate String DelegateFunc(string s1);

class Sample {
    public static string NewReplace(string a) {
        return a.Replace(".net", ".NET");
    }
}

class Program {
    static void Main(string[] args) {
        DelegateFunc delFunc = new DelegateFunc(Sample.NewReplace);
        string str = delFunc("Check your C#.net Skills");
        Console.WriteLine(str);
    }
}
6.
What is the output of the following .NET code:

using System;
using System.Net;

public class MyClass {
    public T Field {
        get;
        set;
    }
}

class Program {
    static void Main(string[] args) {
        MyClass myObj1 = new MyClass();
        myObj1.Field = "good";
        Console.WriteLine(myObj1.Field);

        MyClass myObj2 = new MyClass();
        myObj2.Field = 10;
        Console.WriteLine(myObj2.Field);
    }
}
7.
Which of the following access specifiers is applied to the main() method in .NET?
8.
In .NET, which of the following statements is incorrect?
9.
Which of the following are the class accessibility modifiers in .NET?
10.
In .NET, pointer variables are used to hold the ______________________ of a variable.