Store Substring

Hi Experts,,
Im very new for C programming,
i have variables :

1
2
3
4
char mesej[100] = "Thank You Experts";
char prefix[5];
char infix[3];
char suffix[7];


I want the output like this :
1
2
3
prefix : Thank
infix : You
Suffix : Experts


Thank you Experts
The sizes of the last 3 arrays are inadequate. If N is the number of characters in each they should have sizes of N+1. The last element of each should hold NULL or'/0'
Thank you so much all,,
:)
Topic archived. No new replies allowed.