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
What is the need of structure in c?
What are the advantages of using new operator as compared to the function malloc ()?
What is #define?
Describe the modifier in c?
What are pointers?
Tell me about low level programming languages.
How many types of errors are there in c language? Explain
What are different types of variables in c?
What is a keyword?
Why is c so popular?
Why c language?
Explain indirection?
What is the modulus operator?
What is cohesion in c?
Can you please explain the difference between malloc() and calloc() function?