Skip to content

sosumit001/OOP_IN_C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Object Oriented Program using ANSI - C

Object-oriented programming in ANSI-C is a disciplined approach that implements information hiding, inheritance, and polymorphism by leveraging standard C features like structures and function pointers

It utilizes abstract data types and dynamic linkage to separate implementation from usage, enabling robust code reuse and manageable system decomposition within the confines of plain C

Chapter 1 - Abstract Data Types

1. Primitive Data Types

Basic data types provided by the programming language, such as integers, floats, and characters, along with built-in operations like addition, subtraction, and multiplication.

2. Abstract Data Types

A data type defined by a set of values and a set of operations, where the implementation details are hidden, and only the interface (operations) is exposed to the user.

Example: Javascript (push, pop, shift, unshift)

Watch the video

We build a modular Point entity from scratch:

  • The Interface (Point.h): Defining opaque pointers and exposing only necessary operations (new, move, print, delete).
  • The Implementation (Point.c): Handling the actual struct definition and memory management using malloc and free.
  • The Application (main.c): Consuming the ADT to manipulate data without direct access to the internal structure.
cd AbstractDataTypes/points/
gcc Point.c main.c -o ProgramFile
./ProgramFile

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •  

Languages