PROGRAM TO SWAP TWO NUMBRES USING FUNCTIONS

/*PROGRAM TO SWAP TWO NUMBRES USING FUNCTIONS*/ #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 SQUARE OF A NUMBER USING FUNCTIONS

/*PROGRAM TO FIND SQUARE OF A NUMBER USING FUNCTIONS*/ #include<stdio.h> #include<conio.h> int sqre(int); void main() { int n,s; clrscr(); printf(“Enter any number: “); scanf(“%d”,&n); s=sqre(n); printf(“Square of given number is:%d”,s); …

PROGRAM TO SORT WORDS ALPHABETICALLY

/*PROGRAM TO SORT WORDS ALPHABETICALLY*/ #include<stdio.h> #include<conio.h> void main() { char a[10][20],temp[20]; int i,n,j; clrscr(); printf(“Enter the size of array: “); scanf(“%d”,&n); printf(“Enter elements in the array:\n”); for(i=0;i<n;i++) { scanf(“%s”,a[i]); …

PROGRAM TO COPY ONE STRING INTO ANOTHER STRING

/*PROGRAM TO COPY ONE STRING INTO ANOTHER STRING*/ #include<stdio.h> #include<conio.h> void main() { int i=0; char a[10],b[10]; clrscr(); printf(“Enter any string: “); gets(a); printf(“Before copying string is: “); puts(a); while(a[i]!=’\0′) …