answersLogoWhite

0

//String Concatination
#include
#include

using namespace std;

char* strcat(char*,char*);

int main()
{
char str1[100];
char str2[100];
cout<<" Enter the string 1: ";
cin>>str1;
cout<<"\n Enter the string 2: ";
cin>>str2;
cout<<"\nconcatinated string is: "<getch();
return 0;
}

char* strcat (char* frst, char* scnd)
{
char* rslt = frst;
while (*frst++ != '\0');
frst--;
while ((*frst++ = *scnd++) != '\0');
return rslt;
}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you concatenate a string?

v can concatenate two string by using a function like: select CONCAT( CONCAT('ename','e_mrks'),"name","marks" from student;


Reverse of a string without using string handling function?

shashi


How do you reverse a string in PHP without using a function?

Without any function is impossible. So I'll assume you mean any coded function, in which case the predefined function below is your answer.$string = strrev($string);


Concat a string without using any inbuilt function in java?

Use "+". Example: String string = "does this answer " + "your question?";


Concatenate two files without using strcat function?

Win/Dos: copy file1+file2 tofile unix: cat file1 file2 &gt;tofile


How do you find the length of string without using strlen function in MySQL?

SELECT char_length (...) FROM ...


Write a Program to convert decimal number into hexadecimal no without using function and string?

This is not a question.


Is it possible to convert a string into integer without using any function in c?

Yes


How do you add text together in Excel cell?

You can concatenate text either using the CONCATENATE function or the &amp; operator. If you had text in cell A2 and cell B2 that you wanted to add together in another cell you could do it in either of these ways: =A2 &amp; B2 =CONCATENATE(A2,B2)


How do you concatenate text in Microsoft Excel?

You can concatenate using the &amp; operator. So say you have a firstname of a person in cell B2 and their surname in cell C2 and in D2 you want to display their first name, a space and their surname together, you would do this: =B2 &amp; " " &amp; C2 You could also use the CONCATENATE function to do the same thing: =CONCATENATE(B2," ",C2)


Piglatin string in c without using pointer?

Sure, you can write a function in C to convert a string to Pig Latin without using pointers by passing the string as a parameter and manipulating it directly within the function. You can split the string into words, check if a word starts with a vowel or consonant, and then apply the appropriate transformation following the rules of Pig Latin. Remember to allocate enough memory for the modified string to prevent buffer overflow.


C program to concatenate two strings without using library function?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { char a[10],b[10],c[40]; int i,j; clrscr(); printf("\n\nENTER FIRST STRING:"); gets(a); printf("\n\nENTER SECOND STRING:"); gets(b); for(i=0;a[i]!='\0';i++) c[i]=a[i]; for(j=0;a[j]!='\0';j++) { c[i]=b[j]; i++; } c[i]='\0'; printf("\n\nTHE COMBINED STRING IS:"); puts(c); getch(); }