1. What is the difference between a process and a thread?
A process is an independent program with its own memory space. A thread is a unit of execution within a process that shares the process's memory. Processes are isolated; threads share heap memory but have their own stack. This makes threads faster to create and switch between, but requires synchronization to avoid race conditions.