Constructors

Q1:
What will be the output of the C#.NET code snippet given below?
namespace AptitudeCrackConsoleApplication
{
    class Sample
    { 
        public static void fun1()
        { 
            Console.WriteLine('Aptitude1 method');
        }
        public void fun2()
        { 
            fun1(); 
            Console.WriteLine('Aptitude2 method');
        }
        public void fun2(int i)
        { 
            Console.WriteLine(i);
            fun2(); 
        } 
    } 
    class MyProgram
    { 
        static void Main(string[ ] args)
        { 
            Sample s = new Sample(); 
            Sample.fun1(); 
            s.fun2(123);
        } 
    } 
}

A
Aptitude1 method 
123
Aptitudel method 
Aptitude2 method

B Aptitude1 method 123 Aptitude2 method

C
Aptitude2 method 
123
Aptitude2 method 
Aptitudel method

D Aptitudel method 123

E
Aptitude2 method 
123
Aptitudel method

ANS:A -

Aptitude1 method 
123
Aptitudel method 
Aptitude2 method

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.