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

Is .net a programming language?

753


Explain what is the difference between encrypting a password and applying a hashing?

750


What are the properties of ADO.NET?

864


Explain how to stop a thread?

800


What is stored procedure ? how we use it in .NET ?

859


How do you generate a strong name?

819


What's a windows process in .net?

740


Explain what is the difference between response.redirect & server.transfer?

786


Explain about Behavioral design pattern?

849


What are the different types of Classes in .NET?

833


what is the meaning silverligt control

1894


What is 3 tier architecture?

768


Explain what is an anonymous method and how is it different from a lambda expression?

700


What is the concept of inheritance in .net?

828


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

1815