code for concatination of 2 strings with out using library
functions?

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void strrcat(char *,char *);
void main()
{
char a[50],b[50];
int i;
clrscr();
printf("enter the string 1 :");
gets(a);
printf("enter the string 2 :");
gets(b);
strrcat(a,b);
gets(a);
getch();
}

void strrcat(char *a , char *b)
{
for(int i=0;*a!='\0';i++,a++);
for(int j=0;*b!='\0';j++,i++,b++,a++)
*a=*b;
*a='\0';
}

thank u :)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does selection sort work in c?

629


What is #include cctype?

582


What is memory leak in c?

639


In c programming language, how many parameters can be passed to a function ?

637


how many errors in c explain deply

1633






how to write a c program to print list of fruits in alpabetical order?

1800


What are void pointers in c?

578


What are register variables in c?

578


Can you apply link and association interchangeably?

682


What was noalias and what ever happened to it?

596


What is difference between structure and union in c?

551


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

619


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

709


Write a program for Overriding.

694


How #define works?

625