Ans: 1) Hash table store data as name, value pair. While in array only value is store.
2) To access value from hash table, you need to pass name. While in array, to access value, you need to pass index number.
3) you can store different type of data in hash table, say int, string etc. while in array you can store only similar type of data.
Q2. What are differences between system.stringbuilder and system.string?
The main difference is system.string is immutable and system.stringbuilder is a mutable. Append keyword is used in string builder but not in system.string.
Immutable means once we created we cannot modified. Suppose if we want give new value to old value simply it will discarded the old value and it will create new instance in memory to hold the new value.
Q3. What are the differences between Application object and session object?
Ans: The session object is used to maintain the session of each user. If one user enter in to the application then they get session id if he leaves from the application then the session id is deleted. If they again enter in to the application they get different session id.
But for application object the id is maintained for whole application.
But for application object the id is maintained for whole application.
Q4. What are the different types of indexes?
Ans: Two types of indexes are there one is clustered index and non-clustered index
Q5. How many types of memories are there in .net?
Ans: Two types of memories are there in .net stack memory and heap memory
Q6. Is it possible to set the session out time manually?
Ans: Yes we can set the session out time manually in web.config.
Q7. What are differences between function and stored procedure?
Ans:
1) Function returns only one value but procedure returns one or more than one value.
2) Function can be utilized in select statements but that is not possible in procedure.
3) Procedure can have an input and output parameters but function has only input parameters only.
4) Exceptions can be handled by try catch block in procedures but that is not possible in function.
Q8. What are the differences between Abstract and interface?
Ans: 1) Abstract cannot be instantiated but we can inherit. Interface it cannot be inherit it can be instantiate
2) Interface contain only declarations no definitions. Abstract contain declarations and definitions.
3) The class which contains only abstract methods is interface class. A class which contains abstract method is called abstract class
4) Public is default access specifier for interface we don’t have a chance to declare other specifiers. In abstract we have chance to declare with any access specifier
Q9. What is the difference between primary key and unique key with not null?
Ans: There is no difference between primary key and unique key with not null.
Q10. What is boxing and unboxing concepts in .net?
Ans: Boxing is a process of converting value type into reference type
Unboxing is a process of converting reference type to value type.
Q11. What are the differences between value type and reference type?
Ans: Value type contain variable and reference type are not containing value directly in its memory.
Memory is allocated in managed heap in reference type and in value type memory allocated in stack. Reference type ex-class value type-struct, enumeration
No comments:
Post a Comment