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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Compare & contrast rich client (smart clients or windows-based) & browser-based web application

737


What are the new features in .net core?

767


How boxing and unboxing occures in memory?

828


State the differences between the dispose() and finalize().

786


What is garbage collection and how it works ?

805


Explain the difference between the while and for loop.

776


Is .net a programming language?

747


What are .net functions?

715


How server form post-back works?

809


Explain how do assemblies find each other?

797


What is COM Interoperability in .NET

848


Is there a way to suppress the finalize process inside the garbage collector forcibly in .net?

701


Which dll translate xml to sql in internet information server (iis)?

795


Is there built-in support for tracing?

790


How viewstate is being formed and how it's stored on client in .net?

776