Why are local variables stored in stack?
Answer / Shubhangi Pathak
Local variables are stored in the stack because they have a smaller scope than global or static variables. The stack provides fast access to data due to its sequential nature, which makes it suitable for managing data with shorter lifetimes. Additionally, the size of the stack is limited, ensuring that the program does not consume excessive memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a generic class?
What is a reference type c#?
Can you create sealed abstract class in c#?
Explain a MSIL ? Why is it appreciated by all developers?
which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five chars.but next row it have 100 chars.
Can you use foreach iteration on arrays in c#?
Can an interface inherit an interface
What is lock in c#?
What is the difference between out and ref in c#?
What is the main purpose of xml?
What is virtual in c#?
What is the difference between “dispose” and “finalize” variables in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)