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.
Answer Posted / 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 View All Answers
What's singlecall activation mode used for in .net?
Name the classes that are introduced in the system.numerics namespace.
What are the important components of .net?
Tell us what is heap and what is stack?
How does u handle this COM components developed in other programming languages in .NET?
Explain the difference between the while and for loop. Provide a .net syntax for both loops?
What does jit compilation do in .net?
What is lazy initialization?
How to debug failed assembly binds?
What are the advantages of .net core?
As you know read-only variables and constants have many similarities, but what is at least one way that they differ?
Explain how does assembly versioning work?
What is an assembly? What are the different types of assemblies?
Will my .net app run on 64-bit windows?
What is an anonymous method?