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 general form of function in c?
What is the difference between typedef struct and struct?
Is main a keyword in c?
What is difference between array and pointer in c?
What is the purpose of the preprocessor directive error?
Why is it important to memset a variable, immediately after allocating memory to it ?
please give me some tips for the placement in the TCS.
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
i want to know the procedure of qualcomm for getting a job through offcampus
What is volatile keyword in c?
What is a pointer on a pointer in c programming language?
What is union and structure in c?
What is the difference between printf and scanf )?
What are qualifiers and modifiers c?
Explain a file operation in C with an example.