How much memory will be allocated for anobject of class given below?
class Time{
int Hour;
int Min;
int Sec;
char ampm[2];
};
Select one:
a. 20
b. 14
C. 16
d. 18
Write a program to input data into an array (Take value from user at runtime
for inserting into array using loop) and find out the maximum value and minimum value
from array through pointer?
in calculator what this line means
cout << "**************************************" << endl;
Write a program to find out the length of string by using pointers?
Dynamic Objects and Run Time Polymorphism
Develop a C++ for the Student Examination Details having student class with data members like roll no, name, marks and grade. Member functions in this class are used for accept / display details of students. Create derived classes such as Engineering, Medical, Sciences etc.. calculate grade based on marks obtained by student. [Note: Use virtual function]
Dynamic Objects and Run Time Polymorphism
Develop a C++ program to calculate the area of a box and compare the size of two boxes, and display which box is smaller using this pointer.
Runtime input
3.3
1.2
1.5
8.5
6.1
2.2
Output should be
5.94
Dynamic Objects and Run Time Polymorphism
Develop a C++ program to calculate the area of a box and compare the size of two boxes, and display which box is smaller using this pointer.
Compile time polymorphism using operator overloading
Create the Circle class and overload the + operator so that you can add two Circle objects. Adding two Circle object should give another Circle whose radius the sum of the radii of the two Circle objects.
for example circle1 radius is 7, circle2 radius is 9
Create your own Python code examples that demonstrate each of the following. Do not copy examples from the book or any other source. Try to be creative with your examples to demonstrate that you invented them yourself.
184 words
Compile time polymorphism using operator overloading
Consider a class distance which stores a distance value using kilometer and meter. Overload the = = operator to check the two distance.