The steady-state viscous flow and also heat transfer in the vicinity of an axisymmetric stagnation point on a cylinder moving axially with a constant velocity are investigated. Here, fluid with temperature-dependent density is considered. The impinging freestream is steady and with a constant strain rate (strength) $k\xaf$. An exact solution of the Navier–Stokes equations and energy equation is derived in this problem. A reduction of these equations is obtained by use of appropriate transformations. The general self-similar solution is obtained when the wall temperature of the cylinder or its wall heat flux is constant. All the solutions above are presented for Reynolds numbers, $Re=k\xafa2/2\upsilon $, ranging from 0.1 to 1000, low Mach number, selected values of compressibility factor, and different values of Prandtl numbers where $a$ is cylinder radius and $\upsilon $ is kinematic viscosity of the fluid. Shear stress is presented as well. Axial movement of the cylinder does not have any effect on heat transfer but its increase increases the axial component of fluid velocity field and the shear stress.