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

Answers were Sorted based on User's Feedback



String[] a = new string[10] for(i=0; i<10; i++) { a[i] = i; } How many heap object wi..

Answer / lavanya

10

Is This Answer Correct ?    7 Yes 2 No

String[] a = new string[10] for(i=0; i<10; i++) { a[i] = i; } How many heap object wi..

Answer / rak

11

Is This Answer Correct ?    4 Yes 3 No

String[] a = new string[10] for(i=0; i<10; i++) { a[i] = i; } How many heap object wi..

Answer / dennis

11.
1 for the String[]
and 1 for each individual "string" in the string array.(so total 10)

Is This Answer Correct ?    1 Yes 1 No

String[] a = new string[10] for(i=0; i<10; i++) { a[i] = i; } How many heap object wi..

Answer / shiva

1

Is This Answer Correct ?    2 Yes 3 No

String[] a = new string[10] for(i=0; i<10; i++) { a[i] = i; } How many heap object wi..

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

String[] a = new string[10] for(i=0; i<10; i++) { a[i] = i; } How many heap object wi..

Answer / davamani

1

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Dot Net General Interview Questions

What is the model role in Mvc architecture?

3 Answers  


What is CLR? How it will work?

3 Answers   NeoSoft,


Explain the different types of proxy patterns?

1 Answers  


How do you create threading in .NET? What is the namespace for that?

2 Answers  


Explain the difference between vb and vb.net?

1 Answers  


What are the differences between com architecture and.net architecture?

1 Answers  


What are the different parts of an Assembly in .Net?

1 Answers  


State the various features present in .NET?

1 Answers  


How do you turn off cookies for one page in your site?

3 Answers   Siebel Systems,


How to debug failed assembly binds?

1 Answers  


What is difference between .net and .net core?

1 Answers  


If we want to write a Windows service that cannot be paused, only started and stopped. How to accomplish that?

1 Answers  


Categories