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
What is the difference between override and overload in a method?
What is the use of design pattern?
Explain about the Common Language Runtime?
When a Static Constructor called in .NET?
What are situations when you register .NET assembly in GAC ?
what is the keyword used for self reference?
What are the different.net tools which you used in projects?
What are the different types of memory in .net?
What is namespace in .net?
How is .net core cross platform?
I want to serialize instances of my class. Should I use xmlserializer, soapformatter or binaryformatter?
What is Ajax design pattern in .NET?
Please explain what are an object and a class?
Explain clr, cts and cls?
What does cil do?