answersLogoWhite

0

#include
#include
#include
void main()
{
char str1[30],str2[30];
int l1,l2,i;
clrscr();
gets(str1);
gets(str2);
l1=strlen(str1);
l2=strlen(str2);

for(i=0;i<=l2;i++)
{
str1[l1+i]=str2[i];
}
printf("%s",str1);
getch();
}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Concatenate two files without using strcat function?

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


How do you concatenate two strings without using strcat?

Example1:sprintf (to, "%s%", from1, from2);Example2:size_t len1= strlen (from1);memcpy (to, from1, len1);strcpy (to+len1, from2);


Write a c program to copy the string without using strcpy?

use strcat, strncpy, stpcpy, sprintf, strlen+memcpy, etc


C prog to concatenate two string without using buid in function?

//String Concatination#include#includeusing namespace std;char* strcat(char*,char*);int main(){char str1[100];char str2[100];coutstr1;coutstr2;cout


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;


To copy two strings using strcpy?

Using strcpy and strcat. Or sprintf. Or strlen+memcpy. There are more than solutions.


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)


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)


Is it possible to make a program using for and not with while?

The following cases are all possible:- program without any for and while- program without for- program without while- program with both for and while


How do you write the concatenate the strings using pointer?

char* strcat (char* destination, const char* source) { char* return_value = destination; // temp destination for return while (*(destination++) != '\0'); // find end of initial destination while ((*(destination++) = *(source++)) != '\0'); // copy source to end of destination return return_value; // return original value of destination }


How can a program be written without using a USING instruction?

By using explicit scope resolution.


What is the maximum number of text items that you can join into a single text item using the concatenate functions?

If you used the CONCATENATE function then there's a limit to the number of arguments which is Excel version dependent. Excel 2007 and newer versions allow 255 arguments, all older versions allow 30 arguments. You don't need to use the CONCATENATE function. You can use the &amp; operator to concatenate instead. =A1&amp;", "&amp;B1&amp;", "&amp;C1 Using this method you're only limited by the allowable maximum length for a formula which, again, is version dependent. Excel 2007 and newer versions allow 8192 characters, all older versions allow 1024 characters. You could also concatenate the results of several concatenate formulas in a new formula.