We have a cupcake/dessert truck, we actually had two but the food truck scene died down a bit where we are located so we sold one of the trucks.
The space in the trucks are generally very tight, you CAN outfit your truck to bake out of it, however, we baked out of our bakery and supplied the trucks.
Our first truck we built ourselves and cost around $30k, our second truck we had built for us by a company that specializes in food trucks and cost between $55-60k. You run off a generator (hopefully a silent one if not your customers ears will be ringing) and propane, a 100lb tank of propane will last you around 8 hours or so depending on how much equipment you are powering. All in all it costs us around $300-$400 a day just to take the truck out. Keep in mind you still need to pull permits, have your truck inspected, etc. Your truck will go through the same scrutiny as opening a bakery.
I would avoid doing any cooking in the truck as the heat becomes unbearable even with an extractor and a roof mounted AC.