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

0 Answers  


What are multicast delegates?

0 Answers  


What is UDDI and how to register a web service ?

2 Answers   Msoft, TCS,


What is the use of common language runtime?

0 Answers  


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

0 Answers  


why you wouldn't want to write into it even if you could

0 Answers  


Which is the main Difference Between .Net 2003 and .Net 2005?

1 Answers  


What is different between webusercontrol and in webcustomcontrol?

0 Answers  


Tell us why do we use the “using” statement?

0 Answers  


How can you clean up objects holding resources from within the code?

2 Answers   Wipro,


What is the difference between the C#.NET and VB.NET?

6 Answers   MCN Solutions,


What is managed code execution?

0 Answers  


Categories