How does the program know the type information of each pointer?

A simple example is as follows:

int a = 1
int* p = &a
...
...
int c = *p
Only the address information is retained in the

pointer, so when the program sees * p on the last line, it can know that "take an int from this place", then there must be a record somewhere that "p points to an int", so where is the record going on?

Mar.21,2021

the information pointing to int is used for static checking by the compiler. It is not recorded in the compiled program that p points to an int

.

as shown in the figure, although the pointer types of my above two functions are not the same, the compilation result is the same
https://godbolt.org/
. You can compile C into assembly online on this website

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c373-2c2da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c373-2c2da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?