Numbers vs. Characters vs. Strings
We just learned about different types of data in C. But like with other programming fundamentals, it's perfectly natural to get confused in the beginning.
In fact, a common confusion arises when trying to distinguish between numbers, characters, and strings. For example, in C-programming,
5
is integer data'5'
is character data"5"
is string data
This is because, in C programming,
- character data are enclosed between single quotes
''
- strings data are enclosed between double quotes
""
- numeric data are not enclosed between quotes.