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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of enumerable class in .net?

839


Explain what are an object and a class?

774


What are the collections you've used?

781


Please explain when should you use .net web forms over asp.net mvc?

748


Who is using .net core?

736


Where does the gac exist ?

760


What is the lapsed listener problem?

920


How to load the contents of an xml file into an xmldocument object?

798


What do you mean by web service?

860


Please explain the difference between constants and read-only variables?

723


Is .net an object oriented language? What are their components?

699


Which namespace does it belong to by default?

765


What is connected and diconnected database ?

798


How will you do redo and undo in textbox control?

759


What is a variable of implicit type and what is its scope?

693