Write a one-line logic to copy one string to another.
#include<stdio.h> int main() { char s[100],d[100]; char *p,*q; p = s,q = d; printf("Enter String = "); scanf("%[^\n]",s); while(*q++=*p++); printf("Source = %s\nDestination = %s\n",s,d); }
Output
Enter String = BlackBerry Source = BlackBerry Destination = BlackBerry