Twitter Feed Facebook Google Plus Youtube

Adsense responsive

Recent Post below header

Saturday, 16 February 2013

C PROGRAM: TO COPY STRING

CODING:
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
{
 char a[25],b[25],c[25];
 clrscr();
 printf("Enter 1st string: ");
 gets(a);
 printf("Enter 2nd string: ");
 gets(b);
 strcpy(c,a);
 strcpy(a,b);
 strcpy(b,c);
 printf("\n\na: %s\nb: %s",a,b);
 getch();
}


CODING

OUTPUT

For any query or suggestion please comment below...

No comments:

Post a Comment