Sadaqat Jeelani

Sadaqat Jeelani

  • NA
  • 20
  • 15.1k

brief(1-2lines) description of the following program

Apr 18 2016 12:43 AM
#include<iostream>
#include<conio.h>
using namespace std;
class Example {
int a, b;
public: Example(){
a = 50;
b = 100;
cout << "\nIm Constructor";
}
Example(int x, int y){
a = x;
b = y;
cout << "\nIm Constructor";
}
void Display() {
cout << "\nValues :" << a << "\t" << b; }
};
int main(){
Example Object(10, 20);
Example Object2;
Object2.Display();
system("pause");
return 0;
}

Answers (1)