GoogelAddUnit1

Sunday 8 July 2012

WRITE A C-PROGRAM TO CONCATINATE ANY THREE STRINGS.


AIM:A program to concatinate any three stringsPROGRAM:

#include<stdio.h>
main()
{
int i,j,k;
char a[20],b[20],c[20],d[20];
printf("enter the three strings");
scanf("%s%s%s",a,b,c);
for(i=0;a[i]!='\o';i++)
d[i]=a[i];
d[i]=' ';
for(j=0;b[j]!='\o';j++)
d[i+j+1]=b[j];
d[i+j+1]=' ';
for(k=0;c[k]!='\o';k++)
d[i+j+k+2]=c[k];
d[i+j+k+2]='\o';
printf("the new string is%d",d);
}

OUTPUT:

enter the three strings

the new string is

3 comments:

  1. Hi Gadde Sudheer Kumar,
    i have gone through one of your post at chitfund transactions at Doctoc.com
    by any chance do you have the chitfund application?
    if you have time please reach me on kingramakrishna@gmail.com
    sorry to reach you out in this way as i c't find any other way out to reach you.
    thanks for sharing wonder full work

    ReplyDelete
  2. Bandar Judi Terpercaya dan Teraman di Indonesia. BOLAVITA

    ReplyDelete