← Bitkernel Interview Insights

Bitkernel·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Interviewed for a software engineer role at Bitkernel and got a networking fundamentals question that seemed straightforward but had a subtle twist I almost missed.

Questions Asked (1)

Q1

In socket-based network programming, which of the following statements is incorrect: (A) socket communication requires at least one pair of sockets, (B) sockets exist in communication domains and can only communicate with sockets in the same domain, (C) there are two socket types: stream and datagram, or (D) stream sockets and datagram sockets can communicate with each other as long as the underlying protocol permits?

System DesignTechnical Trade-offs
Author's notes

The answer is D and I did get it right, but for the wrong reason at first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Evaluate each statement against fundamental socket programming concepts, focusing on the OSI model and socket API specifications. Identify the incorrect statement by recalling that stream and datagram sockets are distinct types and cannot directly communicate with each other. Then, briefly explain why the other statements are correct to demonstrate comprehensive understanding.

Pro tip: When answering, not only identify the incorrect statement but also explain the practical implications, such as why mixing socket types would require an application-level gateway. This shows depth beyond textbook knowledge.

1. Understand the question

Read the question carefully to identify that it asks for the incorrect statement among four options related to socket programming.

2. Evaluate each statement

Analyze each option: (A) true, as communication requires at least two sockets; (B) true, sockets in different domains cannot communicate directly; (C) false, as there are more than two socket types (e.g., raw sockets); (D) false, as stream and datagram sockets cannot communicate directly.

3. Identify the incorrect statement

Determine that both (C) and (D) are incorrect, but if forced to choose one, (D) is the most clearly incorrect because it contradicts the fundamental distinction between socket types.

4. Explain your reasoning

Provide a concise explanation for why the chosen statement is incorrect, referencing socket types and communication domains.

5. Confirm with examples

If time permits, give a brief example, such as TCP (stream) and UDP (datagram) sockets cannot directly exchange data without an intermediary.

Key Points to Mention

  • Socket communication requires a pair of sockets (one on each end).
  • Sockets are bound to communication domains (e.g., AF_INET, AF_UNIX) and can only communicate within the same domain.
  • There are multiple socket types, including stream (SOCK_STREAM), datagram (SOCK_DGRAM), and raw (SOCK_RAW).
  • Stream and datagram sockets use different protocols (TCP vs. UDP) and cannot directly communicate.
  • Interoperability between stream and datagram sockets requires an application-level gateway or protocol translation.
  • The incorrect statement is (D) because stream and datagram sockets cannot communicate with each other directly.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.