#include<stdio.h>
void main()
{
char source[30]="salai word2 word3";
char destination[20][20];
printf(" \n\source is: %s\n\n", source);
getch();
}
In the above program, char variable "source" contains three words(separated by space). How can I read the words from "source" and store in another char array "destination". Expectation as follows:
strcpy(destination[0], salai)
strcpy(destination[1], word2)
strcpy(destination[2], word3)