Ad:
Write a program in C, to Input two strings and swap them using strcpy() function. 1
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
char a[20], b[20], c[20];
clrscr();
printf("Enter 1st string:");
gets(a);
printf("Enter 2nd string:");
gets(b);
strcpy(c,a);
strcpy(a,b);
strcpy(b,c);
printf("After swap string is:\n");
printf("1st string is: %s\n2nd string is: %s",a,b);
getch();
}