#include<stdio.h>
#include<conio.h>
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();
}
#include main() { //please read two strings int str1 and str2// while(str1[i]!='/0' &&str2[i]!='/0') if(str1[i]!=str2[i]) flag=1; if(flag==1) printf("equal"); } #include main() { //please read two strings int str1 and str2// while(str1[i]!='/0' &&str2[i]!='/0') if(str1[i]!=str2[i]) flag=1; if(flag==1) printf("equal"); }
Uuencode Because e-mail messages can only include text information, attachments must be converted into text. Before automation, e-mail users had to do this by hand with the uuencode program.
It was a pouch with two strings attached to it.
G strings
An Abacus has beads and strings.
To concatenate strings in PHP, you use the . (dot) character. For example: $str = "String1" . "String2";
a write the algorithm to concatenate two given string
Language dependent. In C, for example, there no string as such, but you can use function strcat to concatenate zero-terminated character-sequences.
strcat if u wnt to use strcat then include string.h header file
concatenate is the operation of joining two character strings end to end. For example, the strings "snow" and "ball" may be concatenated to give "snowball".
#include#includevoid main(){char a[30],b[30];clrscr();printf("Enter the string a:");gets(a);printf("Enter the string b:");gets(b);printf("%s",strcat(a,b));getch();}
Same operator can be used for different purposes like + can be used for addition of two integers and used for concatenate strings.
It is called strcmp, part of the standard run-time library. Returns 0 if the two strings are equals, non-zero otherwise.
It is used for addition - to add two numbers. Also, to concatenate two Strings (texts) - that is, to make a longer text from two shorter ones.
That depends on the programming language. Most languages use the "+" sign, but a few use other signs. For example, PHP uses the dot.
Example1:sprintf (to, "%s%", from1, from2);Example2:size_t len1= strlen (from1);memcpy (to, from1, len1);strcpy (to+len1, from2);
The dot (.) operator in PHP is used to concatenate strings. For instance:$start = "Big";$end = "Bird";echo $start . ' ' . $end;This code would produce the output:Big Bird