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
How does selection sort work in c?
What is #include cctype?
What is memory leak in c?
In c programming language, how many parameters can be passed to a function ?
how many errors in c explain deply
how to write a c program to print list of fruits in alpabetical order?
What are void pointers in c?
What are register variables in c?
Can you apply link and association interchangeably?
What was noalias and what ever happened to it?
What is difference between structure and union in c?
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
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Write a program for Overriding.
How #define works?