Sign up now
to enroll in courses, follow best educators, interact with the community and track your progress.
Objects Oriented Programming Part 14: Computer Science & Applications (in Hindi)
142 plays

This lesson describes the important concepts of object oriented programming.

Co-founder of BSI Academy and running YouTube channel. 5 years of teaching experience. Qualified in UGC NET & CSIR in Computer Science as JR

Unacademy user
  1. NTA UGC NET Paper -2

  2. Computer Science & Application

  3. About Me Sandeep M.Tech (IT) from IIIT CSIR (Engineering Science) as JRF UGC NET (JRF) - Computer Science & Applications Worked as Software Engineer & Research Scientist

  4. Object - Oriented Programming

  5. Part 14

  6. unacademy Follow me on the Unacademy Learning App 127.1k Sandeep Singh Educator since May 201 Co-founder of BSI Academy. 5 years of teaching Qualified in UGC NET in Computer Science and its Get updates about new courses Watch all my lessons Application as JRF& lecturer 14.7k 0 34 Follow . Download slides and watch offline All courses Q Sandeep Singh HINDI Programming in C&C (Hindi) Concepts of Objects Oriented Programming: CBSE UGC NET 0(6 ratings Sandeep Singh

  7. Friend Function Friend Function that is a "friend" of a given class is allowed access to private and protected data in that class.

  8. Friend Function The declaration of friend function should be made inside the body of class (can be anywhere inside clas either in private or public section starting with keyword friend.

  9. Syntax class class name friend returntype function_name(arguments);

  10. Friend Class Friend function a class can be made a friend of another class using keyword friend.

  11. Example Friend function #include<iostream.h> #include<conio.h> class employee private: friend void sal); 3; void sal() int salary-4000; cout<<"Salary: "<<salary; void main(C) employee e; e.sal() getch);

  12. Example class Employee //Overloaded constructor with int parameter Employee(int id)( this->idid; int id string name; public: //Overloaded constructor with a int parameter and a string nstructo Employee(int id, string name)\ Employee() this->id-id; this->namename this->id0; this->name- "default " ; void display()f cout << "Employee Info: "<<" " << id << " " << name.c_str)<<"\n";