C Programming and Data Structures: Unit I: C Programming Fundamentals

Data Types

Classification, Size, Range | C Programming

• Data types specify the type of data we enter in our program. • In C there are some predefined set of data types which are also called as primitive data types.

Data Types

• Data types specify the type of data we enter in our program.

• In C there are some predefined set of data types which are also called as primitive data types.


• Primitive data types are fundamental data types.

(1) integer type: These data types are used to store whole number. (i.e. the number without fraction).

Size and range of Integer type on 16-bit machine :


(2) float type : These are the data types used to store the real numbers (i.e. the numbers with fractional part).

Size and range of Integer type on 16-bit machine


(3) char type: This data type is used to store the character value.

Size and range of Integer type on 16-bit machine


(4) void type : Void data types mean no value. This data type is normally associated with a function that return no value.

Review Questions

1. Examine the various data types in C with an example. AU: May-19, Marks 6

2. Give the length and range of the primitive data types. AU: Dec.-19, Marks 2

 

C Programming and Data Structures: Unit I: C Programming Fundamentals : Tag: : Classification, Size, Range | C Programming - Data Types