Difference Between C Structure and C++ Structure

Hi welcome to Naresh it this is Kishore and today we are going to discuss about the differences between C structure C plus plus structure and C plus plus structure and class today I am going to give the differences between fee structure and C plus plus structure later we are going to discuss about C plus plus structure and class differences what first of all I am going to start what is a structure ok everybody knows structure is a user-defined why it is called user defined data and one more thing here structure is a complex data type now I am going to explain why structure is a user defined where is complex status ok before going to discuss the structure concept I am going to give small example and structured the way what is a structure why we need the structure concept suppose generally we are going for the colleges are classes suppose 20 single glassware going to carry single book with hand or by hands but when several books are there we have to say bag know the point is contains several books of different subjects ok here the point is book a bag contains several books of different subjects that means now in my example the bag is nothing but the structure that mains structure allows to store different types of variables different data types under one name or at one place define structure is simply collection of heterogeneous variables ok we know that I used to store several values of same type only but here structure is used for store ok several values of different types that’s why structure is called collection of heterogeneous where was that main cities having what different types means Complex data type the soil structure is a complex dated next another most important topics general leveraging integers fruits characters OK then is primitive data that is primitive data types are used to store integer type data flow type data character type data and user also using array type data that was derived data type now user requirement is he want to store both primitive and derived data type at 1 ok in real time to store the primitive and derived data types in 21 + 8 into one unit we are using structure that means structure is not collection of primitive and derived data types that’s why it is called user defined data type that means user is constructing the structure based on the requirement for BTC user defined data type next another most important thing of structure is it allows to manage the data in the form of objects structure allows to manage our data in the form of objects nowadays everything is object oriented what happened in object oriented different kind of concepts of stored at one place for example you want to releasable means you want to generate waybill milk contains what item name ok number of items purchased and item cost later amount letter total that means here we have to store several items here we have to store several item details under A wheel now the bill is a object now to conduct this kind of object oriented we should have to go for structure that’s why structures are the foundation for object oriented programming nowadays C plus plus Java there very familiar and their called object oriented concepts object oriented programming languages are there what happened there there using class concept that his which is the extension of fee structure concept that’s why total object oriented concepts is taken from structure concept now here what is the difference between fee structure and C plus space structure ok now I am going to give you the differences between C structure in C plus plus structure for example here I am going to give on the world is the fee structure and it is the C plus plus structure now the first difference between fee structure and C plus plus structure is ok C structure is Collection of data only or collection of variables only that’s why sister praise collection of variable or data only now cplusplus structure it is Collection of data and functions also ok here cplusplus structure is Collection of data or variables and functions also the Sahir Collection of data are variables and functions also it is the first difference between fee structure and C plus plus structure next second differences let me know the difference is very clear it allows to declare only the variables inside the structure which are called structure members and hear it allows to declare both the variables and functions inside the structure which are called members at 4 members means no one is structure members one is Member function that’s why here cplusplus structure is called collection of structure members and member functions ok data member and member functions next second difference by default C structure data ok all the fee structure members are public only that’s why member sir public that means anybody can access from anywhere the Control Programme we can access the structure in data without any restriction next come to the cplusplus structure now this cplusplus structural data is public or private or protected now cplusplus structure members are a public or private or protected that means we can give the secure we can make it secure structure next how are the two major differences in both cases there called in C structure Asif test structure it is a user defined and here also it is user defined actually it is not a difference general topics now it is user defined it is also user define now these are the differences between fee structure and C plus plus specs now or main topic he is in C plus plus class now I am going to give what is the difference between what is the difference between C plus plus structure and class ok now I am going to use of C plus plus structure and class difference is because of total cplusplus is going on classes the soil Year classes for extension of SIP pictures that’s why you have to know the difference between C plus plus structure and class also ok now I am going to you send ok now it is the class and it is the C plus plus structure now in class also collection of variables ok or data and function now watch this both are looking to be same selection of variables or data and functions here also Collection of data are variables and functions that means as usual cplusplus structuralist variables and functions and class also a losser variables and function that’s why both are looking to be next second one watch it here members are public in fees structure now number for public once again private or protected how much II difference members are public or private or protected means here also same public or private or protected that’s why there is no change these two properties are common to structure and class 9 the differences are what are by default class members are private it is the most important feature of C plus plus class here members are by default private next year by default members are trying public it is the most significant difference between class and C plus plus structure by default all the members are private that means when no scope operator is used when no access specifier is used all the members will become private and here all the members will become public it is the first difference next major difference is another major difference they are inherited that means they will participate in inheritance and the Never ok that’s why they are inherited and here not inherited cplusplus structures are not inherited that means from one structure we are not able to create another structure but here from one class we can derive another class fish is called inheritance that’s why they are phosphate in any never participate in inheritance it is the another significant difference between C plus plus class and structure next year when they are participating in inheritance means we construct construct Complex programs big programs ok by using this inheritance concept we can construct a week program that’s why we can create Complex programs it is a another important feature of class but he has they are not going to participate in inheritance now that’s why we are using for simple programs that’s why structures are used to construct simple programs and classes are used to construct Complex programs of these are the major differences between C plus plus structure and class concept ok

Speak Your Mind

*