Set - 3

Question 6 :

What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

Answer :


Question 7 :

What do you mean by binding of data and functions?

Answer :


Question 8 :

What are 2 ways of exporting a function from a DLL?

Answer :

1.Taking a reference to the function from the DLL instance.
2. Using the DLL 's Type Library

Question 9 :

What is the difference between an object and a class?

Answer :

Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.
- A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.
- The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.
- An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.

Question 10 :

Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321]?

Answer :

quicksort ((data + 222), 100);