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

How to load a user control dynamically in runtime?

0 Answers  


What is an EXE?

1 Answers  


how can i create a table from front end to back end in wabe page?

0 Answers  


Difference between assembly manifest & metadata

2 Answers  


Explain me difference between public and static modifiers?

0 Answers  






What is Serialiazation?

1 Answers   TCS,


What is il and c#?

0 Answers  


What is the single responsibility principle?

0 Answers  


How to create properties and methods using controls?

0 Answers   CGI,


Explain .net framework overview?

0 Answers  


Difference b/w dataset.clone and dataset.copy ?

1 Answers   Protech,


Explain the difference between the stack and the heap?

0 Answers  


Categories