3 Data Types in C
3 Data Types in C
Data Transformation
Programs transform data from one form to another
Input data Output data Stimulus Response
Programming languages store and process data in various ways depending on the type of the data; consequently, all data read, processed, or written by a program must have a type Two distinguishing characteristics of a programming language are the data types it supports and the operations on those data types
A Data Type
A data type is
A set of values AND A set of operations on those values
point type
int *, float *, char * used to denote a
Records (Structures)
A record permits a programmer to handle a group of variables as one variable The fields (members) of a record can be any builtin or programmer-defined data type A record can have values assigned to and read from it just like the built-in variable types A record can also be passed as an argument to a function and serve as the return value for a function
typedef struct { double heatReading; int temperatureValue; float speedMeter; char actionCode; } operationsRecordType; operationsRecordType operationsRecordType currentOperations; futureOperations;