Bhaktaraz

Web Enthusiastic, Nature Lover

Tag: c++

A very first program in c++ with the concept of class

include<iostream.h> using namespace std; class person { private: char name[20]; int age; public: void getdata(void); void dislpay(void); }; void person :: getdata(void) { cout<<“Enter name:”; cin>>name; cout<<“Enter age:”; cin>>age; } void person :: display(void) { cout<<“\nName: “< cout<<“\nAge: “< } int main() { person p; p.getdata(); p.display(); return 0; }

Difference between object-oriented programming (OOP) and procedure-oriented programming (POP)

Difference between object-oriented programming (OOP) and procedure-oriented programming (POP) : OOP POP Emphasis on doing things (procedure). Emphasis on data rather than procedure. Programs are divided into what are known as functions. Programs are divided into what are known as objects. Data move openly around the system from function to function. Data is hidden and