Data Types in C
Objectives
After this Session, you will be able to understand Primary data types know how to declare variables assign values to variables
Primary Data Types
Integer Types
Floating Point Types
Character Types
Declaration & Assigning Values
The syntax is Data-type v1,v2..vn; Eg:[Link] count; [Link] ratio, total; ASSIGNING VALUES Variable_name=constant Eg:1) int a=20; 2) bal=75.84; 3) yes=x; C permits multiple assignments in one line. Example: initial_value=0;final_value=100;
Declaration
Declaring a variable as constant Eg: 1) const int class_size=40;
Check Your Progress
Ex 1) declare a few variables and initialize them