ValueLabs Written Test Paper

ValueLabs Written Test Paper  


1. WRITE A PROGRAM THAT ASKS A USER A FOR 5 NUMBERS AND PRINTS THE AVERAGE OF THESE NUMBERS.

2. WRITE A PROGRAM THAT PROCESSES THE FOLLOWING STRING :

STRING SENTENCE =”LEARNING”C# IS EXTREMELY EASY &FUN,ESPECIALLY AT
PROGRAMMERS HEAVEN ! C#HAS A DATA TYPE BYTE WHICH OCCUPIES 8 BITS AND
CAN STORE INTEGERS FROM -128 TO 127 .”;

Iterate through the string and find the number of letters , digits and
punctuation characters in it and print these to the console.

3.Can we override the properties and apply polymorphism on these?

4.When I compile and run the following program what’s the output?

using System;
namespace CSharp
{
Class Test
{
static void Main()
{
Parent theparent=new Child();
Console.Writeline (“i={0}”, theParent.i);
theParent.MyMethod( );
}
}

class Parent
{
public int i = 5;
public virtual void MyMethod( )
{
Console.Writeline(“I am parent’s mymethod( )”);
}
}
}

class Child : Parent
{
public int i =7;
public override void MyMethod( )
{
Console.Writeline(“I am Child’s mymethod( )”;
}
}
}

5. what is the difference between the destructor and the Finalize( ) method?
When does the Finalize( ) method get called?
6. Abstract classes may contain constructors. When we can’t instantiate the
Abstract classes, what is the use of these constructors?

7.
We all know that sub-classes can call the methods defined in the base-class .
Write a program where a base-class calls the method defined in the subclass ?

8.
What is the basic difference between the String and the StringBuilder class ?
What is the difference between the Intern() and Copy() methods of the string class ?

9. what are delegates ? what are the steps involved in creating an event ? Please explain this by writing a code .

10.
How can we know a state of a thread ?

11. what is .NET Remoting ? which class does the remote object has to inherit ?

12. How can we call methods in remoting asynchronously ? What is Asynchronous One-Way Calls ?

13. What is marshalling and what are different kinds of marshalling ?

14. what are custom controls ? Write a code which defines how to create and use a custom control in ASP.NET ?

15. What are different ways by which a control can be binded with client side scripts in ASP.Net ?

16. Write a code to load and use a dll dynamically in ASP.NET .

17. Write a validation expression for a textbox whose valid format should be in form of hh:mm ( where “hh” signifies as hour between 0-23 and “mm” signifies minutes between 0-59).

18. Write a code to build a datagrid in ASP.NET which displays EmployeeId , name and hiredate. Write the query also to get the same.

19. Related to question 18 above write a code to display the employee Address details in a poop up window which will be displayed on clicking on Employee details in a popup window which will be displayed on clicking on Employee ID. Make sure that there is no DB hit for the second time.

20.
What are the disadvantages of viewstate in ASP.NET.

No comments: