NOVELTY - A heat generating apparatus has cracking reactor (10), fuel cell (30), heat exchanger (26), and cracking reactor inlet (16) and outlet (24) flow diverter. The reactor has feed inlet (12), product outlet (14), and defines a catalyst retention space.    USE - Used for providing heat and electricity to building (claimed).    ADVANTAGE - The apparatus is simple and efficient. It eliminates need for hydrogen purification. It also avoids complicated control algorithm to apportion various flows to fuel processor and fuel cell.    DETAILED DESCRIPTION - The heat generating apparatus comprises cracking reactor, fuel cell, heat exchanger, and cracking reactor inlet and outlet flow diverter. The reactor has feed inlet, product outlet, and defines a catalyst retention space. The fuel cell and the heat exchanger have inlet. The inlet flow diverter has first and second inlet connections in communication with a fuel and regenerant source, respectively, and outlet connection in communication with the inlet of the heat exchanger.    INDEPENDENT CLAIMS are also included for the following:    (1) a method of providing heat and electricity to the building comprising: cracking, during carbon deposition cycle, a hydrocarbon fuel under cracking conditions in hydrocarbon cracking reactor in presence of catalyst to yield hydrogen containing effluent; passing the effluent to fuel cell anode to generate electricity; contacting, during regeneration cycle under regeneration conditions and in the reactor, a regenerant with carbon deposited on the catalyst during the carbon deposition cycle to regenerate the catalyst and yield a high temperature regeneration effluent; flowing the regeneration effluent to heat distributing medium to exchange heat with the medium and provide heat to the building; alternating a feed flow to the reactor between the fuel during the carbon deposition cycle and the regenerant during the regeneration cycle; and alternating a product flow from the reactor between the hydrogen containing effluent to the cell during the carbon deposition cycle and the regeneration effluent to the heat exchanger during the regeneration cycle; and    (2) a method of controlling a system (for regenerating heat and electricity) that has the reactor, the cell in communication with the hydrogen containing effluent, furnace in communication with the regeneration effluent stream, and battery in communication with the cell. The method comprises: determining a demand D(H) for heat from the furnace from a deviation between a measured temperature and a set point temperature; assigning, when D(H) is greater than 0, a carbon deposition cycle time Tcd=Ta and regeneration cycle time Tregen=Tb, and allowing fuel gas flow to the furnace; assigning, when D(H)=0, Tcd=T1 and Tregen=T2 where T1 is less than Ta and T2 is less than Tb, and preventing fuel gas flow to the furnace; determining a demand D(E) for electricity from a deviation between a measured voltage level and a set point voltage; initiating, when D(E) is greater than 0, carbon deposition cycle comprising reacting, for duration Tcd, hydrocarbon containing fuel gas stream under cracking conditions in the presence of catalyst to yield hydrocarbon containing effluent stream for generating electricity in the cell and subsequently storing electrical potential in the battery; initiating regeneration cycle comprising reacting, for duration Tregen, regenerant stream under regeneration conditions with carbon deposited on the catalyst during the carbon deposition cycle to yield regeneration effluent stream for providing heat by combustion in the furnace; repeating, when D(E)=0, all the steps; and repeating the same steps for a finite period of operation.    DESCRIPTION OF DRAWING(S) - The figure is a schematic block diagram of a system comprising hydrocarbon cracking reactor, fuel cell, reactor inlet and outlet flow diverters, and heat exchanger for recovering heat from catalyst regeneration cycle.    Cracking reactor (10)    Reactor inlet (12)    Reactor outlet (14)    Inlet flow diverter (16)    Fuel containing source (18)    Regenerant source (20)    Furnace (22)    Outlet flow diverter (24)    Heat exchanger (26)    Heat exchanger inlet (28)    Fuel cell (30)    Fuel cell inlet (32)    Membrane separation system (36)