ExamVeda
Login
Home
41
Which of the following is the correct way to settle down values into the structure variable 'e' defined in the following C# code snippet?
struct emp
{ 
    public String name;
    public int age;
    public Single sal;
}
emp e = new emp();
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
42
Which of the following keyword is used to overload user defined types by defining static member functions?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
43
If base class consist of two private integers, one static integer and derived class consist of two static integers and one private integer. What would be the size of derived class object?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
44
What will be the output of the following C# code snippet?
class maths 
 {
     int fact(int n) 
     {
         int result;
         if (n == 1)
         return 1;
         result = fact(n - 1) * n;
         return result;
     }
 } 
 class Output 
 {
     static void main(String args[]) 
     {
         maths obj = new maths() ;
         Console.WriteLine(obj.fact(4)*obj.fact(2));
     }
 }
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following C# code?
static void Main(string[] args)
{
    Mul();
    m();
    Console.ReadLine();
}
static void Mul()
{
    Console.WriteLine("4");
}
static void m()
{
    Console.WriteLine("3");
    Mul();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
46
Which among the following is the correct statement: Constructors are used to?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
47
What will be the correct statement of the following C# code?
enum color:byte
{
    yellow = 500,
    green = 1000,
    pink = 1300
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
48
Choose the correct statement about enum used in C#.NET?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following C# code?
{
    struct abc
    {
        int i;
    }
    class Program
    {
        static void Main(string[] args)
        {
            abc x = new abc();
            abc z;
            x.i = 10;
            z = x;
            z.i = 15;
            console.Writeline(x.i + "  " + y.i)
        }
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
50
What will be the output of the following C# code snippet?
class maths
{
    public int fact(int n)
    {
        int result;
        result = fact(n - 1) * n;
        return result;
    }
} 
class Program
{
    static void Main(string[] args)
    {            
        maths obj = new maths();
        Console.WriteLine(obj.fact(4));
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board