ExamVeda
Login
Home
21
Among the given pointers which of the following cannot be incremented?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
22
What will be the output of given code snippet?
class Program
{
    static void Main(string[] args)
    {
        char []chars = {'a', 'b', 'c'};
        String s = new String(chars);
        String s1 = "abcd";
        int len1 = s1.Length;
        int len2 = s.Length;
        Console.WriteLine(len1 + " " + len2);
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
23
Which of the following statements are incorrect?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
24
What will be the output of the following C# code snippet?
class UnsafeCode
{
    unsafe static void Main()
    {
        int* ptrs = stackalloc int[3];
        ptrs[0] = 1;
        ptrs[1] = 2;
        ptrs[2] = 3;
        for (int i = 2; i >=0; i--)
        Console.WriteLine(ptrs[i]);
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
25
What is meant by preprocessor directive in C#.NET?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
26
Pointer variable is used to hold the . . . . . . . . of the variable.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
27
What will be the output of the following C# code snippet?
static void Main(string[] args)
{
    string s1 = " Ixg";
    string s2 = s1.Insert(3,"i");
    string s3 = s2.Insert(5, "o");
    for (int i = 0; i < s3.Length; i++)
    Console.WriteLine(s3[i]);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
28
Which of these access specifiers must be used for class so that it can be inherited by another subclass?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
29
Which of these statements is incorrect?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
30
What will be the output of the following C# code snippet?
class UnsafeCode
{
    unsafe static void Main()
    {
        string str = "this is a test";

            fixed (char* p = str)
           {
               for (int i = str.Length-1 ;p[i] != 0 ;i--)
               Console.Write(p[i]);
           }
       Console.ReadLine();
   }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board