Accenture .NET Technical Interview Questions

1. Draw an overview of your project and explain it?
2. Explain OOPS Concept?
3. State the difference between overloading and overriding?
4. State the differences between C & C++?
5. What are static members?
6. What are virtual functions?
7. What are pointers?
8. What are structures?
9. Write a program using static members in c#?
10. Write a factorial program in c#?
11. State the difference between VB and VB.Net?
12. What are the Advantages of .Net?
13. Describe web.config in asp.net?
14. How to measure 4 liters of water using a 3 liter and a 5 liter jug?

Showing Answers 1 - 17 of 17 Answers

johnbrennan

  • Sep 17th, 2008
 

How to measure 4 liters of water using a 3 liter and a 5 liter jug?

1. Make sure both jugs are empty.
2. Fill the 3 liter jug to the top.
3. Pour the contents of the 3 liter jug into the 5 liter jug.
4. Fill the 3 liter jug to the top.
5. Pour the contents of the 3 liter jug into the 5 liter jug until the 5 liter jug is full (i.e. contains exactly 5 liters of water.)
6. There should now be exactly 1 liter remaining in the 3 liter jug.
7. Empty the contents of the 5 liter jug and then pour the contents of the 1 liter jug into the 5 liter jug.
8. Now fill the 3 liter jug to the top. You now have 4 liters of water (1 liter in the 5 liter jug and 3 liters in the 3 liter jug).

using system.data;
using system.windows.forms;
namespace Factorial
{

Partial class factorail
{
int Factorail=1;
int textboxvalue=Convert.ToInt32(textbox1.text)
if(textboxvalue > 0)
{
for(int i=1;i<=textboxvalue;i++)
{
Factorail=i * Factorail;
}
MessageBox.Show(Factorail.ToString())
}
}
else
{
messageBox.show("Enter a Positive No:")
}
}

  Was this answer useful?  Yes

Overloading: Overloading happens when two or more function have the same function name but different return type and parameter.

eg: int sum(int a,int b);
      int sum(int a,int b,int c);
The overloading happens in the same class i,e these function should be in the same class.

Overriding: It happens in inheritance, when base class has a fucntion called "int sum(int a ,int b)"  and the derived class also has the function "int sum(int a ,int b)".in this case we cannt access the base class class function by just creating an object of derived class.

If the base class function has the keyword Virtual then it means that the function should be overrided and we use the keyword Override.

KrShekhar

  • Jul 17th, 2011
 

1. Make sure both jugs are empty.
2. Fill the 5 liter jug to the top.
3. Pour the contents of the 5 liter jug into the 3 liter jug.
4. Empty the 3 liter jug.
5. Pour the contents of the 5 liter jug into the 3 liter jug (Now 2 liter in 3 liter jug).
6. Fill the 5 liter jug to the top.
7.Fill the 3 liter jug (2liter + 1 liter from 5 liter 5 liter jug will now only have four liter :) :)

  Was this answer useful?  Yes

  • Jul 17th, 2011
 

1. Make sure both jugs are empty.
2. Fill the 5 liter jug to the top.
3. Pour the contents of the 5 liter jug into the 3 liter jug.
4. Empty the 3 liter jug.
5. Pour the contents of the 5 liter jug into the 3 liter jug (Now 2 liter in 3 liter jug).
6. Fill the 5 liter jug to the top.
7.Fill the 3 liter jug (2liter + 1 liter from 5 liter 5 liter jug will now obly have four liter :) :) ).

  Was this answer useful?  Yes

Nagendra

  • Feb 1st, 2012
 

Hi frnds may this help you..

1. first fill 5 ltr jug and take that 5 ltr water into another tub.

2. again fill 5 ltr jug and drop that water into same tub.

3. now take out 3ltr+3ltr from the tub 2 times.

4. Now the remaining water has the volume 4 ltr

  Was this answer useful?  Yes

swati sao

  • Feb 13th, 2016
 

Overloading and overriding is the type of polymorphism.
Overloading is also called as static polymorphisms and earlier binding, it will be evaluate at compile time so it is called compile time polymorphism. It contain same function name but it is differentiate on the bases of there parameters.
Overriding is also called as dynamic polymorphism and late binding, it will be evaluate at runtime so it is called runtime polymorphism. It contain same function name and same parameter it is differentiate using virtual keyword.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions