If I should win the lottery and start a 501(c)(3) prior to collecting the winnings, would I be exempt from federal income taxes if I give the winning ticket to the charity?
No. Once you have the right to receive the income, you are subject to the tax. It is the same principle that prevents a donor from avoiding capital gain taxes by transferring property to a charitable remainder trust when the property is already subject to an agreement of sale, or from avoiding capital gain taxes when selling stock and donating the proceeds. In each of these cases you would be assigning your right to receive the income, but since you had the right before the assignment, you would be subject to federal income tax on that income.
If you donate the winnings, you could claim a charitable contribution deduction from your federal income taxes in the year of the gift, of course. But if you win a really big jackpot, your gift could exceed the amount you can deduct in the first year, and perhaps even the amount you can deduct by carrying the excess over for five years. Depending on where you reside, the winnings could be subject to state and/or local taxes as well.