EC-Council
312-92 · Question #99
312-92 Question #99: Real Exam Question with Answer & Explanation
Sign in or unlock 312-92 to reveal the answer and full explanation for question #99. The question stem and answer options stay visible for context.
Question
In the following socket programming code, who will the server allow connections from? int main(void) { int s1, s2; s1 = socket(AF_INET, SOCK_STREAM, 0); sin.sin_port = htons(30); sin.sin_family = AF_INET; sin.sin_addr.s_addr = 0; bind(sockfd, (struct sockaddr *)&sin, sizeof(sin)); listen(sockfd, 10); s2 = accept(sockfd, 10); write(s2, "hello\n", 6) }
Options
- AOnly those coming in on TCP port 10
- BOnly those on the same subnet as the server
- COnly those coming in on UDP port 10
- DAnyone
Unlock 312-92 to see the answer
You've previewed enough free 312-92 questions. Unlock 312-92 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.