You learn a lot as an undergrad, however there are some practical concepts that come up in industry more often than others. The questions below test knowledge of various high level programming concepts new grads should know:
What is the difference between a process & a thread?
Threads run within a process, and run within the same address space meaning they can share memory locations. Each process on the other hand has its own address space.
What is big vs little endianess?
This is the notion of how memory is interpreted, with the most significant bit stored first in memory for big-endian, and the least significant bit stored first for little-endian. When sending data over the network it is assumed the data is in big-endian (network order), while the endianess of the machine is known as host order.
How is 42 represented in hex, binary?
The hex representation of 42 is 0x2A, while the binary representation is 00101010.
In networking, what is the difference between TCP & UDP?
TCP has additional overhead with a 3 way handshake, however the connection has sequence numbers, so we know if a packet was received on the other end. UDP on the other hand has no overhead and way of ensuring the delivery of packets, making it ideal for audio/video media streams where dropped packets are single frames of information.
What are the benefits memoization (caching)?
By storing computed values, we can amortize the time it takes to perform computationally expensive calls by looking up a computed result in constant time.
When should you use polling vs interrupts?
Interrupts are best suited for events fired sporadically upon a change, or when the event must be handled immediatly. Polling is good for periodic and frequent events.
What is a deadlock?
When two threads A and B holding
Lock_B both acquire their respective locks, and then attempt to acquire the lock from the other thread, they will be unable to until the lock has been released. As a result both threads halt execution as they wait indefinitely (deadlock) for each other to release their respective locks.
How would you debug program?
You should use an IDE allowing the use of break points. If programming in C/C++ in a unix environment, GDB. If unable to step through code, add logging to the program.