Friday, March 4, 2011

Interview Questions TFT -- 5

1) If you have two div and you want to display them left-right than what css style you will use?

Answer: There is a float property which has three possible values : none,left and right, you can use that property to flow the content according to your requirement.By default it is none means your content will flow as it is given.

<div style="background:green;border:1;width:10;height:10;float:left" >
<div style="background:yellow;border:1;width:10;height:10">
How are you?

2) What is the use of dot(.) and Hash(#) in CSS?
We use dot(.) to specify the class and Hash(#) for id. If we define an item with dot(.) in CSS than that style will apply to all elements with the same class. Same for id.

3) If you have two elements with the same id, which one you will get while using getElementById().
Very First One( It will check the physical order of elements, float property will not affect this function).

4) What is the difference between getElementById() and getElemntsByName()
getElementById return single element while getElementsByName return array of elements.

5)What do you do make working like a group of radio buttons?
They should have same name to work like a group.

6) Where we use Having clause?
Having clause used with group by and aggregate functions.
Ex. Select Department from Inno Having avg(Salary)>100000 group by Department

7) Difference Between Clustered Index and Non Clustered Index? Can we have more than one clustered index on a table if not than why?
See Link :-

8) What is the difference between lib and binding?
Still Searching....

9) Give me some example of Dynamic polymorphism.
I know only one that is virtual function.

10) Give me some example of call back functions in JQuery.
success function and error function

11) Write a program to print 1-100. All the numbers that are divisible by 3 and 5 should print in word and all other numbers should print in integer.
I know you can write it easily :)

12) You have an array of string. You write a program to get the index of that item which has maximum length.
This is a simple program but you have to write very carefully there should not be any loop holes basically he is checking your coding standard not only logic.

13) Is there any other method to prevent page refresh instead of Update Panel?
Through JQuery you can do it.

14) If you are saving a value using ajax function of JQuery and connection has been break in the middle than how you will handle this situation?
You can attach error call back function to ajax, it will return time out in case of connection break or any other case in which server does not send response.

15) Give me an example of iterator pattern?
See Link :- Iterator Pattern

16) What is the difference between Hashtable and Dictionary?
Dictionary is generic Hashtable is not.When retrieving the values from hashtable you need to typecast them into appropriate type while in case of dictionary there is no need to type cast.

17) What is entity framework?
Don't know.

18)Have you worked in WCF?

19)How will you host webservices?
We can do it just like a web site. by deploying at this path C:\Inetpub\wwwroot. And make it virtual directory from inetmgr.

20) Difference between capturing and bubbling.
See :

21) How will you attach error call back function in ajax call?
Don't know

No comments: