Thanks i have for the advice i edited my post. Can some one explain how to queue a string into array?
1. What iam thinking is just dealing with two functions one for the client1, that will made of a string and then this string will be store in the server function in a form of a queue fifo, does any know a website that explains queues?
2. The server funcition will distribute the string from client1 to all the other clients.
3. Can some one help me improve this code, becuase is not working. Please tell me if iam going in the right path. Thanks for your help.
Code:
#include<stdio.h>
main()
{
client();
server();
return 0;
}
void client(void)
{
char client1[5]= "Hello";
}
void server(void)
{
printf("client1 sends %s", client1);
printf("client2 receives:%s", client1);
printf("client3 receives:%s", client1);
printf("client4 receives:%s", client1);
printf("client5 receives:%s", client1);
printf("client6 receives:%s", client1);
printf("client7 receives:%s", client1);
printf("client8 receives:%s", client1);
printf("client9 receives:%s", client1);
printf("client10 receives:%s", client1);
}