Jenny places 100 pennies on a table, 30 showing heads and 70 showing tails.  She chooses 40 of the pennies at random (all different) and turns them over.  That is, if a chosen penny was showing heads, she turns it to show tails; if a chosen penny was showing tails, she turns it to show heads.  At the end, what is the expected number of pennies showing heads?
1. **Initial Setup**: Jenny has 100 pennies, with 30 showing heads and 70 showing tails.

2. **Choosing Pennies**: Jenny randomly selects 40 pennies to turn over. 

3. **Expected Number of Heads and Tails in the Chosen 40 Pennies**:
   - The probability that a chosen penny is showing heads is \( \frac{30}{100} = 0.3 \).
   - The probability that a chosen penny is showing tails is \( \frac{70}{100} = 0.7 \).

4. **Expected Number of Heads Turned to Tails**:
   - The expected number of heads in the 40 chosen pennies is \( 40 \times 0.3 = 12 \).
   - These 12 heads will be turned to tails.

5. **Expected Number of Tails Turned to Heads**:
   - The expected number of tails in the 40 chosen pennies is \( 40 \times 0.7 = 28 \).
   - These 28 tails will be turned to heads.

6. **Final Calculation**:
   - Initially, there are 30 heads.
   - After turning over, 12 heads are turned to tails, so the number of heads decreases by 12.
   - 28 tails are turned to heads, so the number of heads increases by 28.

   Therefore, the final number of heads is:
   \[
   30 - 12 + 28 = 46
   \]

Conclusion:
\[
\boxed{46}
\]