In your example is x3not char- it is a pointer to char. In most cases, pointer values only make sense in the process from which they originally belonged. If you send the pointer value to another process through a socket, the receiving process usually cannot use it.
char (, , char, ) - struct :
struct rcv {
int x1;
float x2;
char x3[LENGTH];
};
:
struct rcv {
int x1;
float x2;
char x3;
};
( , %c %s printf).
, , , struct, , , .
:
struct , . :
#define N 100
struct rcv {
int x1;
float x2;
char x3[N];
};
... x3, strcpy ( , strncat):
struct rcv data;
data.x3[0] = 0;
strncat(data.x3, some_string, N - 1);