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.

Answers were Sorted based on User's Feedback



There is a array of 99 cells and we have to enter 1-100 elements in it , no two elements would rep..

Answer / 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

There is a array of 99 cells and we have to enter 1-100 elements in it , no two elements would rep..

Answer / 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

More C++ General Interview Questions

check whether a no is prime or not.

3 Answers   TCS,


Differentiate between a template class and class template in c++?

0 Answers  


When can I use a forward declaration?

0 Answers  


What are the benefits of c++?

0 Answers  


Explain the different access specifiers for the class member in c++.

0 Answers  






What is the difference between equal to (==) and assignment operator (=)?

0 Answers  


How is data hiding achieved in c++?

0 Answers  


What are the important differences between c++ and java?

0 Answers  


Describe new operator?

0 Answers  


can output 5 students using one dimensional array

1 Answers   Intel,


Differentiate between the manipulator and setf( ) function?

0 Answers  


the maximum length of a character constant can be a) 2 b) 1 c) 8

0 Answers  


Categories