@Muthumari_B
VIRTUAL FUNCTION
updated
C++
·

#include<iostream> using namespace std; class vir { public: void display() { cout<<"\n Display base class"<<endl; } virtual void show() {
EMPLOYEE DETAILS
updated
C++
·

#include<iostream> using namespace std; int health=1000,pf=1500; class employee { int id,basic,hra,da,gpay,npay; char name[30]; public: void getdata(); void grosspay(); void netpay();
AREA OF SHAPES
updated
C++
·

#include <iostream> using namespace std; int area(int); int area(int,int); float area(float); float area(float,float); int main() { int s,l,b; float r,bs,ht; cout<<"\n\t AREA OF SHAPES ";
MATRIX MULTIPLICATION
updated
C++
·

// MATRIX MULTIPLICATION Using Class #include<iostream> using namespace std; class matmul { public: int a[10][10],b[10][10],c[10][10],i,j,k,r1,r2,c1,c2; void input(); void display();
MATRIX ADDITION AND SUBTRACTION
updated
C++
·

// MATRIX ADDITION and SUBTRACTION ; #include<iostream> using namespace std; class mat { int a[10][10],b[10][10],c[10][10],d[10][10],i,j,n; public: void getdata(); void putdata();
SORTING NUMBERS
updated
C++
·

// SORTING Numbers in ARRAY #include<iostream> using namespace std; int main() { int a[50],n,i,j,temp; cout<<"\n SORTING Numbers"<<endl; cout<<"\n Enter a Limit of Numbers : "; cin>>n;
PRIME NUMBER
updated
C++
·

// PRIME Number Checking Program Using Class #include <iostream> using namespace std; class prime { int n,i,c=0; public: void getdata(); void check();
PALINDROME Number
updated
C++
·

// PALINDROME Number checking program using class #include <iostream> using namespace std; class pali { int n,t,rem,sum=0; public: void getdata(); void check();
ARMSTRONG NUMBER
updated
C++
·

// Armstrong Number Checking Program Using Class #include <iostream> using namespace std; class arms { int a,t,rem,sum=0; public: void getdata(); void check();
SWAP
updated
C++
·

#include<iostream> using namespace std; void swap(int*,int*); void swap(int c,int d); int main() { int a,b; cout<<"swapping two numbers using call by referance "; cout<<"Enter Two Numbers : "; cin>>a>>b; cout<<a<<" ,"<<b<<endl;
STUDENT GRADE

#include <iostream> using namespace std; class student { int rn,mark[10],i,t,n; char name[30]; float avg; public: void getdata(); void total(); void average();
POSITIVE OR NEGATIVE
updated
C++
·

// Positive, Negative or Zero checking using class #include <iostream> using namespace std; class num { int x; public: void getdata(); void check();
GRADE
updated
C++
·

// Find the grade of a student using nested if statement with class #include <iostream> using namespace std; class Grade { int m1,m2,m3,Total,Avg; public: void input(); void check();
PERSONAL DETAILS
updated
C++
·

// Read and display the personal details using class and objects #include<iostream> using namespace std; class personal_details { char name[20], blood[10], gender[10], nationality[10], father[30], mother[30], place[20]; int date, month, year, age; public:
ODD OR EVEN
updated
C++
·

// Odd or Even Number checking using class #include<iostream> using namespace std; class num { int a; public:
LARGEST NUM
updated
C++
·

// Find largest number among three numbers using inline function #include <iostream> using namespace std; inline int large(int a, int b, int c) { if(a > b && a > c) return (a); else if (b > c) return (b);
SWAPPING
updated
C++
·

// Swapping two values using call by value and call by reference #include<iostream> using namespace std; void swap(int *p, int *q) { int swap; swap=*p; *p=*q; *q=swap;
Sample
updated
C++
·

#include <iostream> using namespace std; class sample { int a,b; public: void setvalue() { a=25; b=40; }
Ex2
updated
C++
·

#include <iostream> using namespace std; int main() { int array[]={10,20,30}; cout << -2[array]; return 0; }
Ex
updated
C++
·

#include <iostream> using namespace std; int main() { void a = 10, b = 10; int c; c = a + b; cout << c ; return 0; }