Wednesday, March 2, 2011

MindTree Qns

---------------------------------------------------------------------------------
WRITTEN TEST:
---------------------------------------------------------------------------------

1. Write a program to reverse a given number?
public int Reverse(int num)
{    }


int iGivenNo = 268;
int iRevNo = 0;

while (iGivenNo != 0)
{
iRevNo = iRevNo * 10 + (iGivenNo % 10);

iGivenNo = iGivenNo / 10;
}
Console.WriteLine("Reverse No :" + iRevNo.ToString());

2. Write sample programs to explain static and dynamic polymorphism ?

3. Write a program to display all strings in a string array using foreach?


string[] str = { "raja", "revati", "renuka", "raogopal", "rajireddy" };


foreach (string item in str)
{
Console.WriteLine(item.ToString() + "\n");
}
---------------------------------------------------------------------------------
TECHNICAL:
---------------------------------------------------------------------------------
1. when should we go for a static class?

2. Can a static class contain an instance constructor?


First of all you cannot create object for static class. So where would this instance contructor comes from?
So a Static Class cannot contain instance Constructor.
http://dotnetnotepad.blogspot.com/2010/09/staticshared-members.html

3. how will you call methods in a static class ?

4. I have two classes with in both the classes i have a method Foo() (same name), will that code compile?
 if so, how to call the two methods?
   is there any other way ? (expected answer : indirect way using delegates)

5. What is the difference between Abstract class and Interface ?
when should we go for interface and when should we go for abstract class?

6. write delegate syntax and event syntax and how to add handler method

7. what is the difference between ADO and ADO.Net, why ADO.Net come in to picture?

8. A and B are integer arrays, copy these two into Array 'C' and that should be sorted.

9. int a = 5; int b = 7; how can you swap these two values ? (without taking a third variable)

10. What is storedprocedure? write a sample storedprocedure.

11. In exception handling , in which order you write catch blocks (specific first or generic first) ?

12. What is method overloading ?

are these two methods overloaded?

double Area(double base, double height)
int Area(double base, double height)

13. what should i do if dont want my class to be inherited?

14. Explain about GarbageCollector?

15. What is finalize?

16. What is difference between finalize and Close/Dispose?

17. What is Reflection? how can we invoke a method using reflection

18. What is a webservice? what is the difference between webservice and other distributed computing mechanisms?

19. What is WCF, how it is different from webservice?

20. What is s session , write syntax to use session?

---------------------------------------------------------------------------------
PM ROUND:
---------------------------------------------------------------------------------
1. Explain technical and architecture aspects in your current project?

2. Why should we do client side and server-side validations? when it becomes slower ?
how can you know that client side validation is being bypassed by the user?

3. Write the program to reverse integer without using inbuilt functions and strings? and write another program to test that

4. write a query to get the manager name of a given empNo
(employee table structure: EmpNo(PK), EmpName, DepartmentID(FK), Salary, ManagerID(RK))

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.