Since the 70s, the C preprocessor is still widely used in practice in a number of projects to tailor systems to different platforms and application scenarios. In academia, researchers have criticized its lack of separation of concerns, its proneness to introduce subtle errors, and its obfuscation of the source code. To better understand the problems of using the C preprocessor, we conducted 40 interviews and a survey among 202 developers. We found that developers deal with three common problems in practice: configuration-related bugs, combinatorial testing, and code comprehension. To better deal with these problems, this book presents strategies to detect bugs and bad smells in preprocessor-based systems based on variability-aware analysis and sampling. This work presents useful findings for C developers during their development tasks, contributing to minimize the chances of introducing configuration-related bugs and bad smells, improve code comprehension, and guide developers toperform combinatorial testing.