C++ Question Answer’s In Hindi : What Do you Mean By Class & Object:- Hello Friend’s, This is shubham And i am Back With this QA Series Of C++. In this Series you Will Gets Most important Question’s And Answers’s For Your Exam.. Show Let’s Get Started… As You Can See in The Title Here is our Second Question..


Q.2. – What Do You Mean By Class & Object Explain With Example ?

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.. “What Do you Mean By Class & Object With Example in Hindi”



class student


int rno;

char name[20];

char cls[15];

int fees;  


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;







To guys Apko Meri Ye Post “C++ Question Answer’s In Hindi : What Do you Mean By Class & Object”  kaisi Lagi Hame Jarur Bataye Apne Comments Ke madhyam Se.. Aur Koi Q Ho To Aap Hamse Puch Sakte Hai.. Post Achi Lagi To Share Karna Na Bhule..



Please enter your comment!
Please enter your name here