CONST - void main clrscr ab a1,a2(4,a3(6,7...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> #include<conio.h> class ab { int a,b; public: ab(); ab (int,int y=2); int add(); }; ab::ab() { a=2; b=3; } ab::ab(int x,int y) { a=x; b=y; } int ab::add() { return (a+b);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } void main() { clrscr (); ab a1,a2(4),a3(6,7); cout<<a1.add()<<endl; cout<<a2.add()<<endl; cout<<a3.add()<<endl; getch(); }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online