Data Types in C Programming language.. Mainly we use 3 types of data types in C Language Integers data type Floating point data type Character data type Integer data types : The positive and negative value from the range of (-32,768 to 32,767) is include by the Integer data type. Example: int = 23; Floating point data types: The data types which hold decimal numbers is Floating point data. Example: float = 23.54; Character data type: Single word or single character is used inside character data type. For working with large character or sentences we use String function. The range of character data type is from -128 to 127. Above range is based of ASCII which is corresponding to char, special symbol values. Always use Quotes mark to use character. Example: char = "a"; Let's see one example based on data types:: #include<stdio.h> #include<conio.h> void main() { int a,b; float c; char s; printf("Enter some character"); scanf("%s",&s);...
Comments
Post a Comment