There is a array of 99 cells and we have to enter 1-100
elements in it , no two elements would repeat , so the is one
no. missing because 99 cells and 1-100 nos. so we had to
implement a function to find that missing no.
Answer Posted / shiva sahu
Get the sum of numbers
total = n*(n+1)/2
Subtract all the numbers from sum and
you will get the missing number.
this is not mine,but this ans is right
| Is This Answer Correct ? | 22 Yes | 0 No |
Post New Answer View All Answers
What is helper in c++?
What is heap sort in c++?
Define the process of error-handling in case of constructor failure?
Explain explicit container.
When to use “const” reference arguments in a function?
Distinguish between new and malloc and delete and free().
What is c++ programming language?
What are the types of array in c++?
Why pointer is used in c++?
What are manipulators in c++ with example?
List down the guideline that should be followed while using friend function.
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
Write a Program for find and replace a character in a string.
What is meant by iomanip in c++?
What are the effects after calling the delete this operator ?