What are the differences between a struct in C and in C++?

Answer Posted / anoop chaurasiya

c structure does not support the concept of data hiding but
in approach of c++ class support the concept of data hiding.

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pair in c++?

794


What is new in c++?

845


Where the memory to the static variables is allocated?

759


Is c++ the most powerful language?

744


What are the advantages of using a pointer? Define the operators that can be used with a pointer.

806


What is meant by the term name mangling in c++?

709


How a new operator differs from the operator new?

866


Refer to a name of class or function that is defined within a namespace?

827


Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02

1691


What is the function of I/O library in C++ ?

861


Is c++ fully object oriented?

721


What are the advantages of prototyping?

768


Which software is used to run c++ program?

714


Can we delete this pointer in c++?

931


Should the member functions which are made public in the base class be hidden?

758