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
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 |
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 |
Is string an object in c++?
Is string data type in c++?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
Write a C++ program that asks the user to choose a number between 1 and 1000. Then, your program should be able to guess the number by asking the user no more than 10 yes/no questions. Use a while loop in your program
What does override mean in c++?
What are stacks?
what is multi-threading in C++?
How a macro differs from a template?
What is the use of typedef?
string somestring ; Which of the following choices will convert a standard C++ string object "somestring" to a C string? a) Copy.somestring () ; b) somestring.c_str () c) &somestring [1] d) std::cstring (somestring) e) (char *) somestring
Write about c++ storage classes?
What are the various storage classes in C++?