C Data Types
Data types are used to store various types of data that is processed by program. Data type attaches with variable to determine the number of bytes to be allocate to variable and valid operations which can be performed on that variable. C supports various data types such as character, integer and floating-point types. Character Data Type C stores character type internally as an integer. Each character has 8 bits so we can have 256 different characters values (0-255). Character set is used to map between an integer value and a character. The most common character set is ASCII. Let take a look at example of using a variable which hold character 'A'. #include void main() { char ch = 'A'; printf("%c\n",ch); ch = 65; // using integer representation printf("%c\n",ch); ch = '\x41'; // using hexadecimal representation ...