Home / MCQ Bank / Computer Science Engineering
Computer Science Engineering Linux Difficulty: Medium

What is the output of this program? #include<stdio.h> #include<stdlib.h> #include<netinet/in.h> #include<sys/types.h> #include<sys/socket.h> int main() { int fd_server, fd_client, len, len_client; struct sockaddr_in add_server; fd_server = socket(AF_INET,SOCK_STREAM,0); close(fd_server); perror("accept"); if(listen(fd_server,5) != 0) perror("listen"); fd_client = accept(fd_server,(struct sockaddr*)&add_server,&len); if(fd_client == -1) return 0; }

Select the correct option to test your answer:

More Computer Science Engineering Questions

WSN stands for Which is a lifted version of modus ponens? An econometric model requires . . . . . . . . variables are not reinitialized each time Visual Invokes a procedure and therefore retains or preserves value even when a procedure ends Instructions which can handle any type of addressing mode are said to be . . . . . . . .