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: …

PROGRAM TO FIND REVERSE OF A NUMBER USING POINTER

//PROGRAM TO FIND REVERSE OF A NUMBER USING POINTER. #include<stdio.h> #include<conio.h> void main() { int n,a; int *rev,*rem,*temp; clrscr(); printf(“Enter any number: “); scanf(“%d”,&n); a=n; temp=&n; *rev=0; while(*temp>0) { *rem=*temp%10; …

PROGRAM TO ADD TWO NUMBERS USING POINTERS

/*PROGRAM TO ADD TWO NUMBERS USING POINTERS*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c=0; int *m,*n; clrscr(); printf(“Enter any two numbers: “); scanf(“%d%d”,&a,&b); m=&a; n=&b; c=(*m)+(*n); printf(“Addition of two numbers …