Copy string using recursive function In C Program Tamil


#include<stdio.h>
#include<conio.h>
char *copy(char *,char *,int);
void main()
{
	int i=0;
	char *a,*b;
	clrscr();
	printf("\nEnter the String :");
	scanf("%s",a);
	printf("\nCopied string : %s",copy(a,b,i));
	getch();
}
char *copy(char *a,char *b,int i)
{
    b[i]=a[i];
    if(a[i]!='\0')
    {
		return (copy(a,b,i+1));
    }
    else
    {
	b[i]='\0';
	return b;
    }
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming