Skip to content

Comment on How to Think About Variables in Cparent

Comments

"Not every variable has a data type, e.g. void or function pointers."

A void pointer has type "void* "; a function pointer also has some appropriate type.

Not every object has a type (e.g., a chunk of memory allocated by `malloc()`), but if "variable" means "object created by a declaration", then yes, every object has a type.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.