IndiaBIX
IndiaBIX
Start typing & press "Enter" or "ESC" to close
  • Home
  • Jobs
  • Results
  • Current Affairs
  • GK
  • Online Test
  • HR Interview
  • BLOG

Constructors- General Questions (3)

  • Home
  • Computer Science & Engineering
  • C# Programming Questions and Answers
  • Constructors- General Questions
17. 

Which of the following statements is correct about the C#.NET code snippet given below?

namespace IndiabixConsoleApplication
{
class Sample
{
public int func()
{
return 1;
}
public Single func()
{
return 2.4f ;
}
}
class Program
{
static void Main(string[ ] args)
{
Sample s1 = new Sample();
int i;
i = s1.func();
Single j;
j = s1.func();
}
}
}

A. func() is a valid overloaded function.
B. Overloading works only in case of subroutines and not in case of functions.
C. func() cannot be considered overloaded because: return value cannot be used to distinguish between two overloaded functions.
D. The call to i = s1.func() will assign 1 to i.
E. The call j = s1.func() will assign 2.4 to j.

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

18. 

Which of the following statements is correct?

 

A. A constructor can be used to set default values and limit instantiation.
B. C# provides a copy constructor.
C. Destructors are used with classes as well as structures.
D. A class can have more than one destructor.

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

  • 1
  • 2
  • 3

Questions & Answers

Aptitude Chemical Engineering Civil Engineering Computer Science & Engineering Current Affairs Data Interpretation Electrical & Electronics Engineering Electronics & Communication Engineering General Knowledge Logical Reasoning Mechanical Engineering Non Verbal Reasoning Verbal Ability Verbal Reasoning

Interviews

HR Interview

Jobs

Sarkari Jobs

Results

Rojgar ResultSarkari Result

Admission

Admission 2023

Admit Card

Admit Card 2023

Answer Key

Answer Key 2023
copyright
Privacy Policy
© 2025 IndiaBIX. All Rights Reserved.

Report