Server code :
Int i= 42;
Write ( socket, &i ,4);
Client code
int i;
Read(socket, &i ,4);
Print("%d\n",i);
Client and server both are int 32 bit
pick all that apply
1. The client is guaranteed to print 42
2.The client will print 42 only if the server is a big-endian machine.
3.The client will print 42 if and only if the client and server is a big-endian machine or little endian-machine.
4. The client programm will crash with a segment fault because you cannot write integers directly to a socket.
5.The server programm will crash because i has not been initialised.
Answers
Answered by
0
AI drives business value by combining human orchestration and ingenuity with constantly improved processes and refined data—all delivered through the exponential speed and self-learning power of AI capabilities.
Similar questions