31 .
What Will Be The Output Of The Following Code : using System; public class Program { public static void Main(string[] args) { Console.WriteLine(Math.Round(6.5)); Console.WriteLine(Math.Round(11.5)); } }
A.6 12
B. 6 11
C. 6 10
D.6 15
View AnswerAns: 6 12
32 .
What Will Be The Output Of The Following Code: using System; public class Program { public static void Main(string[] args) { int[] i = new int[0]; Console.WriteLine(i[0]); } }
A.0
B. 1
C. IndexOutOfRangeException
D.Nothing is printed as array is empty
View AnswerAns: IndexOutOfRangeException
33 .
What Will Be The Output Of The Following Code Snippet:
using System;
public class Program
    {
        public static void Main(string[] args)
        {
            byte num = 100;
            dynamic val = num;
            Console.WriteLine(val.GetType());
            val += 100;
            Console.WriteLine(val.GetType());
        }
    }

A.Error
B. System.Byte System.Byte
C. System.Byte System.Int32
D.System.Int32 System.Int32
View AnswerAns: System.Byte System.Int32
34 .
What Will Be The Output Of The Following Code Snippet:
using System;
public class Program
    {
        public static void Main(string[] args)
        {
        #if (!pi)
                    Console.WriteLine("i");
        #else 
                    Console.WriteLine("PI undefined");
        #endif
            Console.WriteLine("ok");
            Console.ReadLine();
        }
    }

A.ok
B. i ok
C. PI undefined ok
D.Error
View AnswerAns: i ok
35 .
What Will Be The Output Of The Following Code Snippet:
using System;
public class Program
    {
        public static void Main(string[] args)
        {
        #if (!pi)
                    Console.WriteLine("i");
        #else 
                    Console.WriteLine("PI undefined");
        #endif
            Console.WriteLine("ok");
            Console.ReadLine();
        }
    }

A.10 10
B. 10 100
C. 10 1000
D.10 1
View AnswerAns: 10 1000