What this program is not able to connect with any client program?


int main()
struct sockaddr_un add_server, add_client;
int fd_server, fd_client;
int len;
char ch;
fd_server = socket(AF_UNIX,SOCK_STREAM,0);
if(fd_server == -1)
add_server.sun_family = AF_UNIX;
if( bind(fd_server,(struct sockaddr*)&add_server,sizeof(add_server)) != 0)
len = sizeof(add_client);
fd_client = accept(fd_server,(struct sockaddr*)&add_client,&len);
return 0;
a) the listen() is missing
b) the connect() is missing
c) the read() and write() are missing
d) none of the mentioned

Submitted by: Murtaza
a) the listen() is missing
Submitted by: Murtaza

Read Online Linux Debugging Job Interview Questions And Answers