What are Data Types?
Think of a computer like a big storage container.
Unless you know the size and type of contents to store, its not possible to store them in available storage.
Data Types are basically that. They let the computer know what exactly are you assigning to a variable, and how much space to allocate for that.
What are Tokens?
We understood what are data types, but tokes is how the computer reads them.
Tokens are basically the smallest units in C language, they include:
Keywords: Reserved words with fixed meanings (e.g., int, float, void, return). You can't use these as names for your own variables.
Identifiers: Names you create for variables, functions, or arrays. (Rules: letters, digits, and underscores only; cannot start with a digit).
Constants: Fixed values like numbers (10, 3.14) or characters ('A').
Others: Strings, operators (+, -), and punctuation (;, {).
I hope this short blog was useful, please follow for more.
Thank you for your time!
Top comments (0)