How to understand the concept of data object in C language?

whether the data object refers to the area where the data is actually stored or the data stored, ask the boss to answer!

C
Dec.20,2021

"data object" itself is a loose term. There is no concept of class or object in C language, so you can use struct to represent a structured data. "data object" may mean struct, or want to express a group of data. In short, it is a loose concept. If it is from a book, the book is probably written or translated poorly.


Hello. According to the supplement you describe, data objects are equivalent to objects used to store data. Then the data object types are int char and so on, but there are two kinds of things in C language: declaration and definition, but only the definition allocates memory, that is, the storage area you describe.
personally understands that the objects and variables described here should have the same meaning.


according to the context supplemented by the subject, it is clear in the book that the data object refers to the storage area of the data , not the value itself. For example:

int a = 5;
int b = 5;

here a and b are two separate data objects, although the values are the same.

Menu