Why does this C code print different values for the same pointer when cast to different types?

Subscribers:
4,450
Published on ● Video Link: https://www.youtube.com/watch?v=Fia5xt0dtr8



Duration: 0:00
6 views
0


Why does this C code print different values for the same pointer when cast to different types?
I hope you found a solution that worked for you :)
The Content is licensed under (https://meta.stackexchange.com/help/licensing) CC BY-SA.
Attention! This video does always use the same license as the source!
Thanks to all those great people for their contributions!

(stackoverflow.com/users/22592417/alphin-thomas)Alphin Thomas
(stackoverflow.com/users/584518/lundin)Lundin
A special thanks goes out to the (stackoverflow.com/questions/79514261/why-does-this-c-code-print-different-values-for-the-same-pointer-when-cast-to-di)Stackexchange community

I wish you all a wonderful day! Stay safe :)
If anything is off, please write me at peter D.O.T schneider A.T ois42.de

casting pointers c dereference memory




Other Videos By Peter Schneider


2025-03-17Ethereum: How to enable Ethereum support in the JAXX mobile wallet?
2025-03-17Tex: How to customize LaTeX listings to achieve this specific layout?
2025-03-17Ethereum: Where can I find the source code for Quorum, the permissioned implementation of Ethereu...
2025-03-17Electronics: A Problem with the Basics of OpAmps
2025-03-17Electronics: Is there anything like RMS for capacitor or inductor?
2025-03-17Ethereum: How to fund an address in foundry test
2025-03-17Ethereum: Node's IP exposed
2025-03-17Ethereum: Will payable modifier throw if no ether is sent to it?
2025-03-17Ethereum: Are contract calls asynchronous in web3.js?
2025-03-17Mathematica: How to apply a condtions on the RHS of this equation
2025-03-16Why does this C code print different values for the same pointer when cast to different types?
2025-03-15Dba: Create a "INTO" table with primary key
2025-03-15Dba: PostgreSQL 9.3: Dump a database excluding the data of some tables
2025-03-15Sympy, I can't solve an equation symbolically. It keeps trying to give real solutions
2025-03-15Codereview: Small Python class for Lindenmayer Systems
2025-03-15Tex: Why are my nodes not aligning?
2025-03-15Dba: MySQL won't start after upgrade from 5.7.30 to 8.4.3
2025-03-15Gis: GDAL/GeoTIFF: consistency between "GDALGetGeoTransform" and "SetDataAxisToSRSAxisMapping"
2025-03-15Dba: Storing arrays in MYSQL?
2025-03-15Mathematica: Definite integral returns unevaluated
2025-03-15Gis: Positioning label for multi-part features QGIS