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 explain what is immutability, what is it for and how is it codified?
What is .net code security?
What's the .net collection class that allows an element to be accessed using a unique key?
What are the different types of Classes in .NET?
Can you write a class without specifying namespace?
How viewstate is being formed and how it's stored on client in .net?
What are the properties of ADO.NET?
What does .net stand for?
What is meant by globalization?
How will you register com+ services?
How do you instantiate a complex number?
If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
What are multicast delegates?
What is namespaces in .net?
Is there a way to suppress the finalize process inside the garbage collector forcibly in .net?