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

What’s a strong name?

0 Answers  


How do I stop my console from closing in c#?

0 Answers  


What do you mean by the delegate in c#?

0 Answers  


Explain the difference between a sub and a function in c#.

0 Answers  


How does one compare strings in c#?

0 Answers  






What is Abstraction?

8 Answers   Google, HCL, IBM, MAHINDRA, Tech Mahindra,


What is the name of c# compiler?

0 Answers  


OOPs concept ?

1 Answers   iGate, MMTS,


how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used

0 Answers   HCL, NIC,


Explain how many types of exception handlers are there in .net?

0 Answers  


What is tuple in c#?

0 Answers  


What is null in database?

0 Answers  


Categories