Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Differentiate between static and dynamic modeling.

1051


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

946


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1195


What is volatile keyword in c?

998


Where we use clrscr in c?

1090


What are the uses of a pointer?

1101


What is header file definition?

1025


What is the role of && operator in a program code?

1017


Do you have any idea about the use of "auto" keyword?

1050


Write a program to swap two numbers without using third variable in c?

1071


Explain what are header files and explain what are its uses in c programming?

1110


What is a macro, and explain how do you use it?

1016


Can math operations be performed on a void pointer?

970


How many main () function we can have in a project?

1065


Differentiate between functions getch() and getche().

988