You can find out how much storage is allocated to a data type by using the sizeof operator discussed in Operator Types Session. Mainframes and midrange machines could use different figures, but would still comply with the rule above. These figures only apply to todays generation of PCs. The amount of storage allocated is not cast in stone. The modifiers define the amount of storage allocated to the variable. The data types explained above have the following modifiers. It reserves twice the storage for the number. int - data typeįloat is used to define floating point numbers.ĭouble is used to define BIG floating point numbers. C does not have the traditional view about logical comparison, but thats another story. Please note that there is not a boolean data type. The value of a variable can be changed any time.Ĭ has the following basic built-in datatypes. The definition of a variable will assign storage for the variable and define the type of data that will be held in the location. C has a concept of 'data types' which are used to define a variable before its use.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |