I have got some question for which iam a bit confused with it. It is True or false question. Here are they:

1. Using binary search in a sorted array of 512 elements may require upto 12 comparisons to determine whether a given element is present in the array.

2. The statment efficiency = Entry::getEfficiency(); calls the method getEfficiency() of the Entry-objects and assigns the return value to the variable named efficiency.

3. Declaring an array and declaring a pointer looks different, but the effect for the program is exactly the same.

Please reply as soon as possible.

1. Use Google to find the complexity algorithm for binary search. This will answer your question. Or code binary search yourself and count the comparisons you need. Or imagine an array of 512 elements and apply binary search on a piece of paper ;-)

2. Hmm. This is a question that you have to answer since you have attended a C++ class? Shouldn't be too hard then.

3. This may be a difficult question in the sense that it will depend on the knowledge of the person who will check your answer if you get points for it or not. But the answer is "NO", it's not the same (with one exception which are the formal parameters in function definitions). You may refer to

http://c-faq.com/aryptr/aryptr2.html

in order to convince people if they have difficulties to understand your answer ...