In C++, a two-dimensional array is declared as following data [1000] [300] What
ID: 3789676 • Letter: I
Question
In C++, a two-dimensional array is declared as following data [1000] [300] What will be the physical address of data [780] [20] if the base address is 2000? Assume that an integer will taka 4 byte of memory to store. What is the smallest floating number can be represented In C++? -3.4 * 10^38 Two complexity measurements obtained from two programs A and B. If Program A is measured in logarithmic time and Program B In linear time, Which program will be considered better than the other one? Explain what we moan by "data abstraction".Explanation / Answer
9. Data abstraction: It is a programming technique that depends on the separation of interface and implementation. In C++, the classes provide great level of data abstraction. They provide sufficient public methods to the exterior world to play with the functionality of the object and to manipulate object data, i.e., state without actually knowing how class has been implemented internally.
For example, a program can make a call to the sort () function without knowing what algorithm the function uses to sort the given values. In fact, the fundamental implementation of the sorting functionality could change between discharges of the library, and as long as the interface stays the same, the function call will still work.