DateTime[] dt = new DateTime[10]
for(i=0; i<10; i++)
{
dt[i] = DateTime(2008, 1, i+1)
}
How many heap object will be created for the above array.
Choose the correct answer below.
Ans: 1, 10, 11, 12
Answers were Sorted based on User's Feedback
Answer / garima kurmi
Correct answer is 1.As the heap is a pointer and stores the
type of the object not the value.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / rattan deep
answer is 11 because i+1 will give 11 value and in C# array
is considered as dynamic structure.
| Is This Answer Correct ? | 0 Yes | 1 No |
What is Application Domain?
Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component
What is Nothing permission set in .Net
What is .net and .net framework?
What are the improvements made in cas in .net 4.0?
Explain the purpose of Remoting in .NET?
0 Answers Petranics Solutions,
What is CLR, CLS,CTS
4 Answers Deloitte, Vee Technologies,
What is garbage collection and how it works. Provide a code example of how you can enforce garbage collection in .net?
What is difference between system.string and system.stringbuilder classes?
Where?s Windows service database located?
What is common language specification (cls)?
What are the security policy levels in .Net