oops-in-cpp-in-hindi

Oops in Hindi – C++ Oops In Hindi

C++

Oops in C++ in Hindi :- C++ Object Oriented Programming Language hai | C++ Bjarne Stroustrup ne develop ki thi | C++ ke Aane se pahle C Or Simula 67 2 popular languages thi |

  • Oops to C++ in Hindi 
  • Features of Opps C++ in Hindi 
  • Object oriented principles of C++ in Hindi 

Oops in C++ in Hindi 

C++ Programming Mai 2 Prakar ke program paradigm ka use Kiya Jata Hai | Yah “Procedure Oriented” Or “Object oriented programming” Hai | Aaj Ke Time Ki Sabhi  programming languages Object oriented programming Ko Istemal Karti Hai | C++ OOPs in Hindi Ek software development paradigm Hai | Joki procedure oriented approach Mai Aane Wale problems Ko solve Karne ke Liye Kiya Jata Hai | C++ Object oriented programming , Data ko program development Ke Douran system Mai flow Nhi Hone Deta । Yah Ise Kisi Bhi other function Kai Duvara Achanak change Hone Se Rokta Hai | Isme problem Ko object Ke Duvara solve Kiya Jata Hai | Or Isme data or function object Kai Sath Kaam Karte Hai | object ke data Ko Keval object ka function Hi access kar sakta Hai ।

Also Read :- C++ Function

 Oops in C++ in Hindi

Features of Object Oriented Programming in Hindi

  • Class
  • Object
  • Data abstraction and encapsulation
  • Inheritance
  • Polymorphism

Niche Diye Gaye C++ Object oriented Support ko bataya gya hai |

Class

Class ek user defined data type hai | ye C language mei structure ki tarah hi hota hai | lekin classes mei aap variable ke sath sath unse realted functions bhi bana sakte hai | jinhe aap bad mei objects ke duvara access kiya ja sakta hai |

Class Definition Syntax:

Class Class_name
  {
     private:
          member data;
     public:
          member functions;
  };

Class Definition Example:

 Class student
{
   private:
        char name[10];
        int marks;
        float percentage;
   public:
        void getdata(void);
        void putdata(void);
};

Objects

Class ek user difined data type hai | Class type ke variables ko objects kaha jata hai |

object creation syntax:

class_name object_name;

object creation example:

student s1;

Aapko Pta Hoga Ki Hamne Class Student Create Kiya Tha Upper Or Ab Hamne Us Class Ka Ek Student s1 Create Kiya Hai | aap Kitne bhi object create Kar Sakte Hai |

Abstraction

Abstraction Means ki end user ko wahi functionality show ki jaye jiski usko jarurat hai | Baki background functionality hide kar di jaye |

Encapsulation

Encapsulation ko data hiding bhi kahte hai | sath hi encapsulation ke duvara data or functions ko outside access se protect kiya jata hai | Encapsulation ke 3 types hote hai ( Public , Private , Protected) ka protection provide karti hai |

Inheritance

Inheritance object oriented programming ka concept hai | Jisme ek code ko dusri jagah par istemal kiya ja sakta hai | ye code re-usability implement karta hai |

Example:

#include <iostream>
using namespace std;
class ParentClass {
  //data member
  public:
    int var1 =100;
};
class ChildClass: public ParentClass {
  public:
  int var2 = 500;
};
int main(void) {
  ChildClass obj;
}

Polymorphism

C++ mei Polymorphism function overloading duvara implement kiya jata hai | jisme ek name ke funcitons ko alag alag conditions mei execute kiya jata hai |

Example:

#include <iostream>
using namespace std;
class Sum {
  public:
    int add(int num1,int num2){
      return num1 + num2;
    }
    int add(int num1, int num2, int num3){
      return num1 + num2 + num3;
    }
};
int main(void) {
   //Object of class Sum
   Sum obj;

   //This will call the second add function
   cout<<obj.add(10, 20, 30)<<endl;

   //This will call the first add function
   cout<<obj.add(11, 22);
   return 0;
}

Output:

60
33

C++ Oops In Hindi

Also Read This Post :

Dosto mujhe ummed hai ki aap C++ Object Oriented Programming in Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Oops in Hindi – C++ Opps In Hindi

Leave a Reply

Your email address will not be published. Required fields are marked *