Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
What is OSI reference model?
Posted By :
Posted Date :
January 21, 2010
OSI(Open System Interconnection) is a network communication standard developed by ISO.
You can also find related Interview Question to
What is OSI reference model?
Which layer of OSI reference model is responsible for 'Encryption & Decryption' and 'Compression & Decompression'?
Presentation layer of OSI model is responsible for 'Encryption & Decryption' and 'Compression & Decompression' for data security.
IEEE 802.3 Logical relationship with OSI Reference Model?
1. IEEE 802.3 physical layer corresponds to the OSI physical layer.
2. OSI data link layer is divided into two IEEE 802 sublayers .
(A). The Media Access Control (MAC) sublayer .
(B). The MAC-client sublayer .
ATM - Protocol Reference Model ?
ATM protocol reference model describes the functions of different types of layers and organizational units that act on data when it is transmitted using ATM technology.
What are the major data structures used in RDBMS, Network data model & Hierarchical data model.
RDBMS - Array (i.e. Array of structures)
Network data model - Graph
Hierarchical data model - Trees
What is Data Model?
A collection of conceptual tools for describing data, data relationships data semantics and constraints.
What is E-R model?
This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.
What is Object Oriented model?
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.
what are value types and reference types?
Value type - bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort
Value types are stored in the Stack
Reference type - class, delegate, interface, object, string
Reference types are stored in the Heap
What are Value types and Reference types?
Value types directly contain their data which are either allocated on the stack or allocated in-line in a structure. Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. Variables that are value types each have their own copy of the data, and therefore operations on one variable do not affect other variables. Variables that are reference types can refer to the same object; therefore, operations on one variable can affect the same object referred to by another variable. All types derive from the System.Object base type.
What is Reference counting in COM ?
Reference counting is a memory management technique used to count how many times an object has a pointer referring to it. The first time it is created, the reference count is set to one. When the last reference to the object is nulled, the reference count is set to zero and the object is deleted. Care must be exercised to prevent a context switch from changing the reference count at the time of deletion. In the methods that follow, the syntax is shortened to keep the scope of the discussion brief and manageable.
How can you reference current thread of the method ?
"Thread.CurrentThread" refers to the current thread running in the method."CurrentThread" is a public static property.
How do I call a member method and pass a primitive type (Value Type) by reference?
Use the ref keyword when declaring the parameter of the method, for example:
public bool GetValue( ref int returnValue );
This will pass the numeric by reference.You can modify the value of returnValue within the body of GetValue and it will persist when the method call returns.
Value Types & Reference Types
In C# data types are classified into two categories-value types and reference types. The difference between value type and reference type is that the variables of value type are allocated on stack, whereas, variables of reference type are allocated on heap. Secondly, the variable of value type contains data, whereas, variable of reference type contains the address of the memory location where data of that variable is stored. Among built-in data types, all the types of integers, floats, doubles, decimals, chars and bools are value types, whereas, the string and object are reference types. Among user-defined data types, classes, interfaces and delegates are reference types, whereas, structure is a value type.
Memory allocated for objects of value types is freed when they go out of scope. Memory allocated for objects of reference types is freed when they are no more being referenced.
Both the value and reference types have advantages and disadvantages. Memory allocation on stack is faster than that on heap. So, if the object is small, we must use a value type rather than a reference type. On the other hand, if the object is big we must avoid declaring it as a value type. Because, if we assign it to any other object, its whole contents would get copied, consuming additional memory. As against this, in case of a reference type only the reference is copied rather than the whole object
Value type & reference types difference? Example from .NET. Integer & struct are value types or reference types in .NET?
Most programming languages provide builtin data types, such as integers and floatingpointnumbers, that are copied when they are passed as arguments (that is, they are passed by value). In the .NET Framework, these are called value types. The runtime
supports two kinds of value types:
The .NET Framework defines builtin
value types, such as System.Int32 and
System.Boolean, which correspond and are identical to primitive data types
used by programming languages.
Your language will provide ways to define your own value types, which derive from System.ValueType. If you want to define a type representing a value that is small, such as a complex number (using two floatingpoint numbers),
you might choose to define it as a value type because you can pass the value type efficiently by value. If the type you are defining would be more efficiently passed by reference, you should define it as a class instead.
Variables of reference types, referred to as objects, store references to the actual data. This following are the reference types:
This following are the builtin
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend