ExamVeda
Login
Home
71
What will be the Correct statement in the following C# code?
class sample
{
    protected int index;
    public sample()
    {
        index = 0;
    }
}
class sample 1: sample
{
    public void add()
    {
        index += 1;
    }
}
class Program
{
    static void Main(string[] args)
    {
        sample 1 z = new sample 1();
        z . add();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
72
Choose the correct statement about structures as to why they are defined as value types but not reference types?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
73
What will be the output of the following C# code?
class A
{
    public int i;
    public void display() 
    {
        Console.WriteLine(i);
    }
}    
class B: A 
{
    public int j;
    public void display() 
    {
        Console.WriteLine(j);
    }
}    
class Program
{
    static void Main(string[] args)
    {
        B obj = new B();
        obj.i = 1;
        obj.j = 2;
        obj.display();
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
74
Does C#.NET support partial implementation of interfaces?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
75
Which statement correctly defines Interfaces in C#.NET?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
76
What will be the correct statement in the following C# code?
class trial
{
    int i;
    float d;
}
struct sample
{
    private int x;
    private Single y;
    private trial z;
}
sample s = new sample();
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
77
What will be the output of the following C# code?
namespace ConsoleApplication4
{
    abstract class A
    {
        public int i ;
        public int j ;
        public abstract void display();
    }    
    class B: A    
    {
        public int j = 5;
        public override void display() 
        {
            this.j = 3;
            Console.WriteLine(i + "  " + j);
        }
    }    
    class Program
    {
        static void Main(string[] args)
        {
            B obj = new B();
            obj.i = 1;
            obj.display();     
            Console.ReadLine();
        }
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
78
What will be the correct statement in the following C# code?
struct book
{
    private String name;
    private int pages;
    private Single price;
}
book b = new book();
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
79
What will be the output of the following C# code?
static void Main(string[] args)
{
    int x = 8;
    int b = 16;
    int C = 64;
    x /= b /= C;
    Console.WriteLine(x + " " + b+ " " +C);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
80
Which procedure among the following should be used to implement a 'Has a' or a 'Kind of' relationship between two entities?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board