If you define integer variable and a object variable and a structure then how those will be plotted in memory ?



If you define integer variable and a object variable and a structure then how those will be plotted ..

Answer / mr vinod kumar

Integer , structure – System.ValueType -- Allocated memory on stack , infact integer is primitive type recognized and allocated memory by compiler itself .
Infact , System.Int32 definition is as follows :
[C#]
[Serializable]
public struct Int32 : IComparable, IFormattable, IConvertible
So , it’s a struct by definition , which is the same case with various other value types .
Object – Base class , that is by default reference type , so at runtime JIT compiler allocates memory on the “Heap” Data structure .
Reference types are defined as class , derived directly or indirectly by System.ReferenceType

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

how can i display crystal report in button_click? am working with VS2005..........plz help me

1 Answers  


What is datareader c#?

0 Answers  


what is the lifespan of the items stored in viewstate ?

4 Answers  


What is different between Implicit conversion and Explicit conversion in C#?

0 Answers  


What is the main usage of keyword “virtual” ? How does it work for a method or property?

0 Answers   Siebel,


Explain synchronous and asynchronous operations?

0 Answers  


explain the nature of the assembly work?

0 Answers   HCL,


How would you describe encapsulation in c#?

0 Answers  


Define c# and list the features.

0 Answers  


State two different types of access modifiers.

0 Answers  


How do you declare an interface in c#?

0 Answers  


Write one code example for compile time binding and one for run time binding? What is early/late binding?

0 Answers  


Categories