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 manifest in .net?

0 Answers  


Explain what does managed mean in the .net context?

0 Answers  


What is a system lock?

2 Answers   Wipro,


Explain the different parts of an assembly?

0 Answers  


What is the difference between response.write & response.output.write?

0 Answers  






What are server controls?

1 Answers   Avanade, Wipro,


What is a strong name in .net?

0 Answers  


what are the controls used to upload a file from client to server?

4 Answers  


What is jit compilers?

0 Answers  


What is the difference between function and stored procedure?

0 Answers  


What is namespaces in .net?

0 Answers  


Please explain what is the difference between a class and an object?

0 Answers  


Categories