What things would you remember while making an interface?
Answer / Manjula
When creating an interface in C++, remember to:
1. Define pure virtual functions (functions without implementation).
2. Use abstract classes (classes with at least one pure virtual function).
3. Make sure the derived classes implement all the pure virtual functions.
4. Keep interfaces independent of implementations.
5. Make interfaces easy to extend and difficult to modify.
| Is This Answer Correct ? | 0 Yes | 0 No |
what are the iterator and generic algorithms.
sizeof- is it functioning statically or dynamically?
What is decltype c++?
What is the difference between the indirection operator and the address of oper-ator?
What C++ libraries are you proficient with?
How many ways are there to initialize an int with a constant?
What is the difference between new/delete and malloc/free?
when can we use copy constructor?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What is low level language in simple words?
What is enum class in c++?
A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.