Object-oriented programming (oop) is a programming paradigm that represents the concept of
“object” that have data fields (attributes that describe the object) and associated procedures known as
An object can be considered a “thing” that can perform a set of related activities. The set of activities
that the object performs defines the object’s behaviour. For example, the hand can grip something or
a student (object) can give the name or address .
Features of opps.
Class and object:- A class is a blueprint that describes characteristics and function of entity.. for example, the class dog would consist of traits shared by all dogs. A class is collection of the properties and methods are called members. Object is an instance of class.
Data abstraction:– it is a process that provides only essential features by hiding its background details. A data abstraction is a simple view of an object that includes required features and hides theunnecessary details.
Data encapsulation:– it is a machine of bundling the data , and the functions that use them and data abstraction is a mechanism of exposing only the interface and hiding the implementation details from the user. C++ supports the properties of encapsulation and the data hiding through the creation of user-defined types, called classes. We already have studied that a class can contain private, protected and public members. By default, all items defined in a class are private.
Inheritance:- it is a process to create a new class from existing class or classes. Class ‘B’ is a sub
class that is derived from class ‘A’. thus class ‘A’ is a parent class and class ‘B’ is a child class. It
provides reusability of code.
Polymorphism:– Generally, it is the ability to appear in different forms. In oops concept, it is the ability to process object differently depending on their data types. It’s the ability to redefine methods for derived classes.
So, What is C Programming and why should we learn it as a beginner on IT industries? C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972 by Dennis Ritchie. it is a general-purpose programming language that is extremely popular, simple, and flexible to use. It is a structured […]
Increment and decrement operators in C C language contains two unary operators referred to as increment (++) and decrement (–) operators. The two unary arithmetic operators in C Increment operator (++) Decrement operator (- -) The increment operator increments the variable by one and the decrement operator decrements the variable by one. These operators can […]
A member of a class that can be redefined in its derived classes is known as a virtual member. In order to declare a member of a class as virtual, we must precede its declaration with the keyword virtual. When a function is made virtual, C++ determines which function to be used at runtime based […]