what isthe difference between c structure and c++ class

Answer Posted / harshad khedekar

c does not allow struct data type to be treated like built-in datatype also it does not supports data hiding concept.in c++ instead of struct we have class which overcomes all the above limitations.

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are constructors in oop?

801


Why do we use class?

817


How do you use inheritance in unity?

805


What does I oop mean?

839


Why is polymorphism important in oop?

818


What polymorphism means?

812


What is the difference between encapsulation and polymorphism?

832


What does and I oop mean?

839


What is the purpose of enum?

767


What is overloading in oops?

840


Which language is not a true object oriented programming language?

870


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1879


What does and I oop mean in text?

858


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2827


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

929