Hi there,
I wrote the following code, what I intend to do is to use '!' as delimiter to save string to different variables, however, I found that all the characters include '!' save to first variable "name", would you please give me a hand. Thanks a lot.
#include <stdio.h>
int main()
{
char name[128];
char address[128];
char phone[16];
scanf("%s!%s!%s!", &name, &address, &phone);
printf("%s %s %s", name, address, phone);
fflush(stdin);
getchar();
}