C Program to Concatenation Of Two Strings

C Program to Concatination of two string without use of any predefined function:

This is string concatination program in which we take to character array and take input from user.
we will concat two string without altered the actual.
For Example:
String1= hello
String2= world
after concatination it will become “helloworld”

ALGORITHM:-

step 1 : Start
step 2 : Take two character array
step 3 : Enter the string in each array
step 4 : Concate the first string with second string
step 5 : Print the final result
step 6 : Stop execution


PROGRAM CODE:-

#include<stdio.h>
#include<conio.h>

void main()
{
int i=0,j=0;
//there we take two character array
char string1[20],string2[20];
puts("Enter first string");
gets(string1);
puts("Enter second string");
gets(string2);
printf("Before concatenation the strings aren");
puts(string1);
puts(string2);
while(string1[i]!='')
{
i++;
}
while(string2[j]!='')
{
string1[i++]=string2[j++];
}
string1[i]='';
printf("After concatenation the strings aren");
puts(string1);
getch();
}


OUTPUT:-

Enter first string:
hello
Enter Second string:
world
Before Concatenation the string are:
hello
world

After Concatenation the string are:
helloworld
C Program To Sort the array using bubble sorting
How sort the array element your bubble sorting in ascending order
bubble sorting using c