Question
class abc
{
public static void a()
{
console.writeline("first method");
}
public void b()
{
a();
console.writeline("second method");
}
public void b(int i)
{
console.writeline(i);
b();
}
}
class program
{
static void main()
{
abc k = new abc();
abc.a();
k.b(20);
}
}
a.
second method
20
second method
first method
b.
first method
20
first method
second method
c.
first method
20
d.
second method
20
first method
Posted under C# programming
20
first method
second method
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is output of the following section of code ?
Similar Questions
Discover Related MCQs
Q. What is the return type of constructors?
View solution
Q. Which method has the same name as that of its class?
View solution
Q. Which operator among the following signifies the destructor operator?
View solution
Q. The method called by clients of a class to explicitly release any resources like network,connection,open files etc.When the object is no longer required?
View solution
Q. Name a method which has the same name as that of class and which is used to destroy objects also called automatically when application is finally on process of being getting terminated.
View solution
Q. Operator used to free the memory when memory is allocated ?
View solution
Q. Select wrong statement about destructor in C#?
View solution
Q. What is the return type of destructor ?
View solution
Q. Which among these access specifiers should be used for main() method?
View solution
Q. Which of these is used as default for a member of a class if no access specifier is used for it?
View solution
Q. What is the process by which we can control what parts of a program can access the members of a class?
View solution
Q. Which of these base class are accessible to the derived class members?
View solution
Q. Which of these access specifiers must be used for class so that it can be inherited by another sub class?
View solution
Q. Which of the following statements are incorrect ?
View solution
Q. Accessibility modifiers defined in a class are?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C# programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!
Microprocessor
Understand the heart of your computer with our Microprocessor MCQs. Topics include...
Cyber Security
Understand the fundamentals of safeguarding digital assets with our Cyber Security...
Software Engineering
Learn about the systematic approach to developing software with our Software...