Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What's singlecall activation mode used for in .net?

964


Name the classes that are introduced in the system.numerics namespace.

1024


What are the important components of .net?

980


Tell us what is heap and what is stack?

1083


How does u handle this COM components developed in other programming languages in .NET?

2088


Explain the difference between the while and for loop. Provide a .net syntax for both loops?

926


What does jit compilation do in .net?

1019


What is lazy initialization?

1013


How to debug failed assembly binds?

1006


What are the advantages of .net core?

943


As you know read-only variables and constants have many similarities, but what is at least one way that they differ?

959


Explain how does assembly versioning work?

982


What is an assembly? What are the different types of assemblies?

1126


Will my .net app run on 64-bit windows?

1044


What is an anonymous method?

1067