i have an array of 10 objects whose values are from 1-10
randomly inserted. i have deleted one array object.
tell me what is that value? write the logic of it.

Answers were Sorted based on User's Feedback



i have an array of 10 objects whose values are from 1-10 randomly inserted. i have deleted one arr..

Answer / rajani

Suren is right to some extent.if in case of random 10 number also. first take the sum of all numbers by running a loop. then delete a number . again run the loop and find the sum then subtract second from first .

Is This Answer Correct ?    5 Yes 0 No

i have an array of 10 objects whose values are from 1-10 randomly inserted. i have deleted one arr..

Answer / suren

its simple for guys 4m Engineering background.
if u have an idea with series of numbers, (n(n+1)/2)

first take the sum of all the objects in array, next
subtrat the sum of arrays after deletion of object. this
will give you the deleted object value.

1,2,3... 10; sum = 10(10+1)/2=55

suppose the value of object deleted is 6;

then sum of the array after deletion will be 49;

55-49=6 ANS:

Is This Answer Correct ?    12 Yes 8 No

Post New Answer

More Dot Net General Interview Questions

How big is the datatype int in .net?

0 Answers  


What is Assembly manifest? what all details the assembly manifest will contain.

1 Answers  


What is Event Bubbling in .NET?

0 Answers   Viscus Infotech,


1 mor thing guyz....can i go for C# directly without C++ /JAVA knowledge for dot net ..???

3 Answers  


Explain when should you use .net web forms over asp.net mvc?

0 Answers  


Explain how to manage pagination in a page using .net?

0 Answers  


Can "this" be used within a static method?

0 Answers  


What is "common language specification" (cls) in .net?

0 Answers  


What is the advantage of .net core?

0 Answers  


How to create multiple inheritance in c#, with example?

0 Answers  


What is use of ContextUtil class?

1 Answers  


What is static constructor, when it will be fired? And what is its use?

0 Answers  


Categories