If the static port get blocked for any reasons and the aircraft is not fitted with an alternate static source while in Mode C with SSR, will the ATC still get the height information from my transponder?
It will stop reporting correctly as it is connected to the same static air line as the altimeter
The transponder depends on an external altitude encoder to provide the digitized pressure altitude that the transponder needs for its Mode C replies. The encoder is connected the same static air line as the altimeter and is wired electrically to the transponder
However the transponder may not know the port is blocked and will still report the erroneous information it is receiving. If the port is blocked it’s pertinent to shut off altitude reporting manually.
If the static ports were blocked the mode c transponder would likely still report an altitude based on the static (atmospheric) pressure that was in the system when it became blocked. But as soon as the aircraft changed altitude or other pressure variations occurred, the mode c altitude report (displayed to ATC), would be erroneous.
From the FAA's AMT Airframe Handbook Volume 2 (full version) (FAA-H-8083-31), volume 10 (link is here)
(emphasis is mine)