What Do You Mean By Class & Object In C++ Hindi:- Hello Friends Mera Naam Shubham Hai, & I am Back With QA Series Of C++ in Hindi. Todays Topic is What Do You Mean By Class & Object In C++ in Hindi.

What Is Class & Object in C++ Hindi

Class

 Object Ke Complete Set ko Class Kahte Hai. Yeh ek User-define Data type hai, Jisme object ki Coding actual me ki jati hai.

Ager simple Sabdo me Samjhe to “Class is Collection of Data member’s and his Function’s”

Hear Is Syntax Of Class:-

Class Student

{ int a,b;

____

____ };

 

Object

Object ek type ka variable hota hai & isse basic Run time entry bhi kaha jata hai. jo ki program ko handle karta  hai.

Oops, Ke program me Object ko iss prakar Choose kiya jata hai ki Wo real world Object ke saath Closely match ho sake…

AB Ham Object Ka Use karke Ek Simple Sa Program banaye ge.  Is Program Me Ham Ek Student name Ki Class Banayege Aur Fir Usme get() & Show() Function Banayege Aur fir Student Object Ke jariye Un Function’s Ko access karege.

A Basic C++ Program Example

#include<iostream.h>

#include<conio.h>

class student

{private:

int rno;

char name[20];

char cls[15];

int fees;  

public:

void get()

{ cout<<“Enter roll no= “;      cin>>ron;

cout<<“Enter Student Name= “;    cin>>name;

cout<<“Enter Class= “;     cin>>cls;

cout<<“Enter Fees= “;     cin>>fees;

}    void show()

{  cout<<rno<<“\t”<<name<<“\t”<<cls<<“\t”<<fees;

}  };

void main()

{ clrscr();

student s1, s2;

s1.get();

s2.get();

s1.show();

s2.show();

getch();

}

What Is Class And Object In C++ In Hindi Video Guide

Video Credit: easytuts4you

Related Post

What is Constructor in C++ in Hindi with an example

What Is Friend Function in C++ With Example In Hindi

What is Inheritance in C++ in Hindi Complete Guide

Thankyou For Reading This Post, If You it Then Shares With Your Friends On Social Media.

If You Have Any Question Related Regarding What Do You Mean By Class & Object In C++ Hindi Then Comment.

More Tags: What Is Class And Object In C++, What Do You Mean By Class in C++ Hindi, Difference Between Class And Object in Hindi, what is class and object in c++ with Example, what is the relation between class and object in c++.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.