String[] a = new string[10]

for(i=0; i<10; i++)
{
a[i] = i;
}

How many heap object will be created for this array. Choose
the answer below.

Ans: 1, 10, 11, 12

Answer Posted / suresh

ANS:11
VALUES ARE STORED IN ARRAY FROM 0.HERE STRING[].
HERE TOTAL I VALUE IS 10 AND IT IS STORED IN ARRAY INCLUDING
STARTING POINT.SO 10+1=11.SO

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does msil do?

564


Please explain what is reflection and what is it for?

509


Why do we use the “using” statement?

547


Explain memory-mapped files.

640


Tell us what is heap and what is stack?

567






What is .net3.5?

609


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

608


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

546


Whate are resource files?

614


A developer company sends dlls to the client. Some client is not happy current functionality, so request some modification. Developer made some changes and send new dll to all clients. Some client is happy with old version, tell me minimal change to so that neither clients get affected?

523


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

601


How will you load dynamic assembly? How will create assemblies at run time?

1630


Please explain what are an object and a class?

535


Conceptually, what is the difference between early-binding and late-binding?

595


What are the features of dot net?

547