Explain data types in C
Answers
Answered by
0
A datatype in C is any of the native types, such as int, long, float, double, char, or a struct or union. The latter two are what are called user-defined types. Pointers also have types associate with them, though C is not strict about the type of the data that a pointer points to. For example, it's totally legit in C for an int pointer to point to a character string, or a char pointer to point to an array of integers, etc. (though it will probably demand that you cast it before it will accept that). Mostly what C uses types to do is measure bit-widths and offsets in memory. Each of the types represents a bit-width, and that's pretty much it. It doesn't pay much attention to the actual content of data.
Similar questions