...
Monday, February 29, 2016
Sunday, February 14, 2016
Sunday, February 14, 2016
Unknown
No comments

To Show exception handling.
//Try block throwing exception
#include <iostream>#include <conio.h>using namespace std;int main(){ int a; int b; cout<<"Enter value of A and B"<<endl; cin>>a>>b; try { ...
Sunday, February 14, 2016
Unknown
No comments

To sort 10 number in asscending order using function template.
Program:-
#include <iostream>#include <conio.h>using namespace std;template <class T>void Sort(T a[],int n){ T hold; int i,j; for(i=0;i<n;i++) { for(j=0;j<n-1-i;j++) ...
Monday, February 8, 2016
Monday, February 08, 2016
Unknown
No comments

//Adding two number using class template...
#include <iostream>#include<conio.h>using namespace std;template <class T>class mytemp{private: T a,b,c;public: void getdata() { cout<<"Enter first number:"; cin>>a; ...
Monday, February 08, 2016
Unknown
No comments

// Program to Swap Two Numbers Using Function Template.
#include <iostream>#include<conio.h>>using namespace std;template <class T>void Swap(T &n1, T &n2){ T temp; temp = n1; n1 = n2; n2 = temp;}int main(){ int i1=8, i2=2; float f1=7.1,...
Sunday, February 7, 2016
Saturday, February 6, 2016
Saturday, February 06, 2016
Unknown
No comments

// Run time polymorphism
#include<iostream>#include<conio.h> using namespace std; class media{ protected: char title[50]; char pub[50]; ...
Saturday, February 06, 2016
Unknown
No comments

//Virtual Base Class
#include <iostream>#include<conio.h>using namespace std;class person{protected: char name[20]; int age;public: void getdata() { cout<<"Enter name and age"<<endl; cin>>name>>age; ...
Friday, February 5, 2016
Subscribe to:
Posts (Atom)