Let:
$$ I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1+e^x} dx. $$
We can use the property $ \int_a^b f(x) dx = \int_a^b f(a+b-x) dx $.
Applying this property:
$$ I = \int_{-\pi/2}^{\pi/2} \frac{\cos(-\pi/2 + \pi/2 - x)}{1+e^{-\pi/2 + \pi/2 - x}} dx = \int_{-\pi/2}^{\pi/2} \frac{\cos(-x)}{1+e^{-x}} dx. $$
Since $ \cos(-x) = \cos x $, we have:
$$ I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1+e^{-x}} dx. $$
Rewriting $ 1+e^{-x} $ as $ \frac{e^x+1}{e^x} $, the integral becomes:
$$ I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{\frac{e^x+1}{e^x}} dx = \int_{-\pi/2}^{\pi/2} \frac{e^x \cos x}{1+e^x} dx. $$
Now, add the original expression for $ I $ and this new expression:
$$ 2I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1+e^x} dx + \int_{-\pi/2}^{\pi/2} \frac{e^x \cos x}{1+e^x} dx. $$
Combine the fractions under a common denominator:
$$ 2I = \int_{-\pi/2}^{\pi/2} \frac{\cos x + e^x \cos x}{1+e^x} dx = \int_{-\pi/2}^{\pi/2} \frac{(1+e^x) \cos x}{1+e^x} dx = \int_{-\pi/2}^{\pi/2} \cos x dx. $$
Evaluate $ \int_{-\pi/2}^{\pi/2} \cos x dx $:
$$ \int_{-\pi/2}^{\pi/2} \cos x dx = \sin x \Big|_{-\pi/2}^{\pi/2} = \sin(\pi/2) - \sin(-\pi/2) = 1 - (-1) = 2. $$
Thus:
$$ 2I = 2 \implies I = 1. $$
Final Answer: The final answer is $ \boxed{1} $.
We need to find the value of \(\int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + e^x} \, dx\).
Let \(I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + e^x} \, dx\).
We use the property \(\int_a^b f(x) dx = \int_a^b f(a+b-x) dx\).
So, \(I = \int_{-\pi/2}^{\pi/2} \frac{\cos (-\pi/2 + \pi/2 - x)}{1 + e^{-\pi/2 + \pi/2 - x}} \, dx = \int_{-\pi/2}^{\pi/2} \frac{\cos (-x)}{1 + e^{-x}} \, dx\).
Since \(\cos(-x) = \cos x\), we have: \(I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + e^{-x}} \, dx = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{\frac{e^x+1}{e^x}} \, dx = \int_{-\pi/2}^{\pi/2} \frac{e^x \cos x}{1 + e^x} \, dx\).
Now we have two expressions for I:
\(I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + e^x} \, dx\) and \(I = \int_{-\pi/2}^{\pi/2} \frac{e^x \cos x}{1 + e^x} \, dx\).
Adding these two expressions for I, we get:
\(2I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + e^x} + \frac{e^x \cos x}{1 + e^x} \, dx = \int_{-\pi/2}^{\pi/2} \frac{\cos x + e^x \cos x}{1 + e^x} \, dx = \int_{-\pi/2}^{\pi/2} \frac{(1+e^x) \cos x}{1 + e^x} \, dx\)
\(2I = \int_{-\pi/2}^{\pi/2} \cos x \, dx\)
\(2I = [\sin x]_{-\pi/2}^{\pi/2} = \sin(\pi/2) - \sin(-\pi/2) = 1 - (-1) = 2\)
\(I = \frac{2}{2} = 1\)
Therefore, the correct option is (C) 1.