PROGRAM TO PRINT FIBONACCI SERIES USING RECURSION

/*PROGRAM TO PRINT FIBONACCI SERIES USING RECURSION*/ #include<stdio.h> #include<conio.h> void fib(int,int,int); void main() { int n,a=-1,b=1; clrscr(); printf(“Enter the limit of series: “); scanf(“%d”,&n); printf(“First %d terms of fibonacci series …

PROGRAM TO SHOW LARGEST OF TWO NUMBRS USING FUNCTIONS

/*PROGRAM TO SHOW LARGEST OF TWO NUMBRS USING FUNCTIONS*/ #include<stdio.h> #include<conio.h> void large(int,int); void main() { int a,b; clrscr(); printf(“Enter any two numbers: “); scanf(“%d%d”,&a,&b); large(a,b); getch(); } void large(int …

PROGRAM TO SHOW CALL BY REFERENCE

/*PROGRAM TO SHOW CALL BY REFERENCE*/ #include<stdio.h> #include<conio.h> void arper(int *,int *,int,int); void main() { int l,b,ar,per; clrscr(); printf(“Enter length and breadth of rectangle: “); scanf(“%d%d”,&l,&b); arper(&ar,&per,l,b); printf(“Area of rectangle …

PROGRAM TO SHOW CALL BY VALUE

/*PROGRAM TO SHOW CALL BY VALUE*/ #include<stdio.h> #include<conio.h> int area(int,int); int peri(int,int); void main() { int l,b,ar,per; clrscr(); printf(“Enter length and breadth of rectangle: “); scanf(“%d%d”,&l,&b); ar=area(l,b); per=peri(l,b); printf(“Area of …

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); …