PROGRAM TO PRINT SIZE OF DATATYPES

/*PROGRAM TO PRINT SIZE OF DATATYPES*/ #include<conio.h> #include<iostream.h> class size { int i,f,c,li,d,ld; public: void calculate(); }; void size::calculate() { i=sizeof(int); f=sizeof(float); c=sizeof(char); li=sizeof(long int); d=sizeof(double); ld=sizeof(long double); cout<<“Size of …

PROGRAM TO SWAP TWO NUMBERS BY CALL BY VALUE

//PROGRAM TO SWAP TWO NUMBERS BY CALL BY VALUE// #include<stdio.h> #include<conio.h> void swap(int,int); void main() { int a,b; clrscr(); printf(“Enter the value of first number: “); scanf(“%d”,&a); printf(“Enter the value …

PROGRAM TO WRITE DATABASE OF STUDENTS

/*PROGRAM TO WRITE DATABASE OF STUDENTS*/ #include<stdio.h> #include<conio.h> void main() { struct student { char name[20]; int roll_no; int year; }s[5]; int i,yr,rno,count=0; char ch; clrscr(); printf(“Give details of each …

PROGRAM TO SWAP TWO NUMBRES USING POINTERS

/*PROGRAM TO SWAP TWO NUMBRES USING POINTERS*/ #include<stdio.h> #include<conio.h> void swap(int *, int *); void main() { int a,b; clrscr(); printf(“Enter any two numbers: “); scanf(“%d%d”,&a,&b); printf(“Before swapping numbers are: …