If the batsman hit the ball and hits the ball while going to the wicket if he stops the ball by the bat he is out or not out?
Batsman can stop the ball hitting the stumps with his bat but he will be given out if he touches the ball with his hand (the example is steve waugh was judged as out when he tried to stop the ball hitting the wicket with his hand)
I would also like to mention one thing about Inzamam's incidence he was given out not because of hitting the ball with a bat twice but obstructing the field i.e., hitting the ball thrown by the fielder with the bat to avoid run-out
Batsman will be given out.
If the ball going to the stumps hit by the bat twice intentionally before the ball has been touched by a fielder, it will be given out by the umpire under the rule hitting the ball twice.In your scenario, the batsman is hitting the ball twice to save the wicket. So, it is an intentional act.
An example of this dismissal occurred in 1906 when John King, playing for Leicestershire against Surrey at The Oval tried to score a run after playing the ball twice to avoid getting bowled.
If the ball going to the stumps hit by the bat intentionally after the ball has been touched by a fielder, it will be given out by the umpire under the rule obstructing the field.
There is a famous example for this in an Indo-Pak match. Inzamam was given out for hitting the ball thrown by the fielder to save the wicket.