abstraction and encapsulation is one of the concepts of OOPs and C is not an OOP [Object Oriented Programming language] obviously abst & encap will not be supported by 'C' Abstraction & encapsulation is a concept of OOP [Object Oriented Programming] But, 'C' is not an OOP whereas it is a POP [Procedure oriented programming], so obviously 'C' does not support abstraction and encapsulation
Answer Encapsulation is not inherently supported but it can be emulated in C. The use of static and extern keywords for functions are almost equivalent to your private and public keywords in java (encapsulation). Read up more on those keywords.. Structures become an object's attributes while functions accepting pointers the the said struct become its methods.
Chat with our AI personalities
Objectives Oriented Evaluation Approach is the means by which the worth or merit of a program is assessed based on the extent to which the objectives or purposes of the program are being achieved.
the 4 oops concept are: 1. Encapsulation: The process of wrapping data into a single unit is called Encapsulation 2. Inheritance: This the process in which a properties of a predefined class can be inherited in a new class making the object of that class in the making class. 3. Polymorphism: This the process in which a program can have more than one function with the same name but different parameters. 4. Data Hiding: It is the process of creating a logical insulation between the program and the environment.
Abstraction is a process by which higher concepts are derived from the usage and classification of literal ("real" or "concrete") concepts, first principles and/or other abstractions.
Encapsulation is also known as wrapping because it wraps the data in the same way as a toffee is wrapped to create a logical insulation between the data(program) & the outer world(computer).
Encapsulation wraps up data and functions under a single unit and ensures that only essential features get represented without representing the background details which is nothing but abstraction. Therefore, encapsulation is a way of implementing abstraction