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 / amty
Get the sum of numbers
total = n*(n+1)/2
Subtract all the numbers from sum and
you will get the missing number.
| Is This Answer Correct ? | 41 Yes | 2 No |
Post New Answer View All Answers
What is a syntax in c++?
what is data encapsulation in C++?
What are compilers in c++?
What is decltype c++?
Is there a sort function in c++?
What is the difference between global int and static int declaration?
Why is standard template library used?
Explain unexpected() function?
How many characters are recognized by ANSI C++?
What is std :: flush?
Can we delete this pointer in c++?
Implement stack operations with pointers with appropriate exception checks.
Is there a c++ certification?
Mention the purpose of istream class?
Explain the difference between using macro and inline functions?