際際滷

際際滷Share a Scribd company logo
Data types in C
Enrollment no.170110107014
Kashyap Joshi
Batch:1D07
G H Patel College of Engineering & Technology, V. V.
Nagar,
Academic Year: 2017-18 (Odd Sem.)
Class: First Year Computer Engineering
2110003-COMPUTER PROGRAMMING & UTILIZATION
Data types
Basic definition of data type is a data storage
format that can contain a specific type or range
values.
When computer data store in variables, each
variables assigned specific data type.
Types of data types
1.Primary (or fundamental) data types.
2.Derived data types.
3.User-defined data types.
Data types in C language
Integer Types
 Integers are the whole numbers with arrange of values
supported by a particular machine.
 There are signed integers and unsigned integer. Signed
integer used one bit for sign and other bits for magnitude of
their number. Unsigned integers are always positive. It does
not contain any bit for sign so that it occupies all the bit for
the magnitude of the number.
 ANSI C has mainly three class of integer storage ,namely short
integer, integer and long integer, in both signed and
unsigned forms.
Size and range of Data types on a 16-bit machine.
Type Size(bits) Range
Char or signed char 8 -128 to 127
Unsigned char 8 0 to 255
Int or signed int 16 -32,768 to 32,767
Unsigned int 16 0 to 65535
Short int or signed short int 8 -128 to 127
Unsigned short int 8 0 to 255
Long int or signed long int 32 -2,147,483,648 to 2,147,483,647
Unsigned long int 32 0 to 4,294,967,295
Floating points types
Floating point numbers are stored in 32 bits with 6 digits of
precision .
Floating point numbers are defined in C by the keyword float.
When the accuracy provided by float is not sufficient double data
type is used. It uses 64 bits giving a precision of 14 digits.
When you want to extend more precision you can use the long
double data type . Which uses 80 bits.
Size and range of floating point types.
Type Size(bits) Range
Float 32 3.4E - 38 to 3.4E + 38
Double 64 1.7E  308 to 1.7E + 308
Long double 80 3.4E  4932 to 1.1E + 4932
Void types
The void type has no values.
The type of the function is said to be void when it does
not return any value to calling function.
It can also play the role of generic type , meaning that it
can represent any of the other standard types.
Character types
A single character can be defined as a
character(char) type data.
Characters are usually stored in 8-bits (one byte) of
internal storage.
The qualifier signed and unsigned may be explicitly
applied to char.
While unsigned chars have between 0 and
255,signed chars have values from -128 to 127.
Typedef
Using typedef keyword we can define our own user
defined data type.
Syntax:
typedef type identifier;
Example:
typedef int marks;
marks sub1,sub2;
Enumeration
Declare using keyword enum.
Syntax:
enum identifier {value1,value2,value3,,value N};
Example:
enum day{Monday , Tuesday,,Sunday};
Thank you

More Related Content

What's hot (20)

data types in C programming
data types in C programmingdata types in C programming
data types in C programming
Harshita Yadav
Data types in C
Data types in CData types in C
Data types in C
Tarun Sharma
Datatypes in c
Datatypes in cDatatypes in c
Datatypes in c
CGC Technical campus,Mohali
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
programming9
Programming in c Arrays
Programming in c ArraysProgramming in c Arrays
Programming in c Arrays
janani thirupathi
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
programming9
Function in C program
Function in C programFunction in C program
Function in C program
Nurul Zakiah Zamri Tan
Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C Programming
Qazi Shahzad Ali
Pointers C programming
Pointers  C programmingPointers  C programming
Pointers C programming
Appili Vamsi Krishna
Character set of c
Character set of cCharacter set of c
Character set of c
Chandrapriya Rediex
Pointers in c language
Pointers in c languagePointers in c language
Pointers in c language
Tanmay Modi
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
Structure in C
Structure in CStructure in C
Structure in C
Kamal Acharya
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
Mahender Boda
C keywords and identifiers
C keywords and identifiersC keywords and identifiers
C keywords and identifiers
Akhileshwar Reddy Ankireddy
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
Tarun Sharma
constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in C
Sahithi Naraparaju
Strings
StringsStrings
Strings
Mitali Chugh
Pointer in c
Pointer in cPointer in c
Pointer in c
lavanya marichamy
Strings in C language
Strings in C languageStrings in C language
Strings in C language
P M Patil

Similar to Data types in C language (20)

Constants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiConstants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya Jyothi
SowmyaJyothi3
Data types in C
Data types in CData types in C
Data types in C
Ansh Kashyap
Primitive-Data-Types-in-C-An-Overview.pptx
Primitive-Data-Types-in-C-An-Overview.pptxPrimitive-Data-Types-in-C-An-Overview.pptx
Primitive-Data-Types-in-C-An-Overview.pptx
MarkMascardo
lecture 3 bca 1 year.pptx
lecture 3 bca 1 year.pptxlecture 3 bca 1 year.pptx
lecture 3 bca 1 year.pptx
classall
Module 1:Introduction
Module 1:IntroductionModule 1:Introduction
Module 1:Introduction
nikshaikh786
datatypes-200723165518 (1).pptx
datatypes-200723165518 (1).pptxdatatypes-200723165518 (1).pptx
datatypes-200723165518 (1).pptx
NaniBhai3
About size_t and ptrdiff_t
About size_t and ptrdiff_tAbout size_t and ptrdiff_t
About size_t and ptrdiff_t
PVS-Studio
Memory management of datatypes
Memory management of datatypesMemory management of datatypes
Memory management of datatypes
Monika Sanghani
5-Lec - Datatypes.ppt
5-Lec - Datatypes.ppt5-Lec - Datatypes.ppt
5-Lec - Datatypes.ppt
AqeelAbbas94
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
Pratik Devmurari
datatypes and specifiers_and variables.pptx
datatypes and specifiers_and variables.pptxdatatypes and specifiers_and variables.pptx
datatypes and specifiers_and variables.pptx
ShirishaBuduputi
Data type
Data typeData type
Data type
Isha Aggarwal
CONSTANTS, VARIABLES & DATATYPES IN C
CONSTANTS, VARIABLES & DATATYPES IN CCONSTANTS, VARIABLES & DATATYPES IN C
CONSTANTS, VARIABLES & DATATYPES IN C
Sahithi Naraparaju
Programming Fundamentals lecture 6
Programming Fundamentals lecture 6Programming Fundamentals lecture 6
Programming Fundamentals lecture 6
REHAN IJAZ
A Closer Look at Data Types, Variables and Expressions
A Closer Look at Data Types, Variables and ExpressionsA Closer Look at Data Types, Variables and Expressions
A Closer Look at Data Types, Variables and Expressions
Inan Mashrur
data types in c programming language in detail
data types in c programming language in detaildata types in c programming language in detail
data types in c programming language in detail
atulk4360
PPS_unit_2_gtu_sem_2_year_2023_GTUU.pptx
PPS_unit_2_gtu_sem_2_year_2023_GTUU.pptxPPS_unit_2_gtu_sem_2_year_2023_GTUU.pptx
PPS_unit_2_gtu_sem_2_year_2023_GTUU.pptx
ZwecklosSe
cprogrammingdatatype using clangauge(1).ppt
cprogrammingdatatype using clangauge(1).pptcprogrammingdatatype using clangauge(1).ppt
cprogrammingdatatype using clangauge(1).ppt
ShirishaBuduputi
cprogrammingdata_type in with explanation.ppt
cprogrammingdata_type in with explanation.pptcprogrammingdata_type in with explanation.ppt
cprogrammingdata_type in with explanation.ppt
ShirishaBuduputi
cprogrammingdatatypesand differentdtatypes (1).ppt
cprogrammingdatatypesand differentdtatypes (1).pptcprogrammingdatatypesand differentdtatypes (1).ppt
cprogrammingdatatypesand differentdtatypes (1).ppt
ShirishaBuduputi
Constants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiConstants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya Jyothi
SowmyaJyothi3
Data types in C
Data types in CData types in C
Data types in C
Ansh Kashyap
Primitive-Data-Types-in-C-An-Overview.pptx
Primitive-Data-Types-in-C-An-Overview.pptxPrimitive-Data-Types-in-C-An-Overview.pptx
Primitive-Data-Types-in-C-An-Overview.pptx
MarkMascardo
lecture 3 bca 1 year.pptx
lecture 3 bca 1 year.pptxlecture 3 bca 1 year.pptx
lecture 3 bca 1 year.pptx
classall
Module 1:Introduction
Module 1:IntroductionModule 1:Introduction
Module 1:Introduction
nikshaikh786
datatypes-200723165518 (1).pptx
datatypes-200723165518 (1).pptxdatatypes-200723165518 (1).pptx
datatypes-200723165518 (1).pptx
NaniBhai3
About size_t and ptrdiff_t
About size_t and ptrdiff_tAbout size_t and ptrdiff_t
About size_t and ptrdiff_t
PVS-Studio
Memory management of datatypes
Memory management of datatypesMemory management of datatypes
Memory management of datatypes
Monika Sanghani
5-Lec - Datatypes.ppt
5-Lec - Datatypes.ppt5-Lec - Datatypes.ppt
5-Lec - Datatypes.ppt
AqeelAbbas94
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
Pratik Devmurari
datatypes and specifiers_and variables.pptx
datatypes and specifiers_and variables.pptxdatatypes and specifiers_and variables.pptx
datatypes and specifiers_and variables.pptx
ShirishaBuduputi
CONSTANTS, VARIABLES & DATATYPES IN C
CONSTANTS, VARIABLES & DATATYPES IN CCONSTANTS, VARIABLES & DATATYPES IN C
CONSTANTS, VARIABLES & DATATYPES IN C
Sahithi Naraparaju
Programming Fundamentals lecture 6
Programming Fundamentals lecture 6Programming Fundamentals lecture 6
Programming Fundamentals lecture 6
REHAN IJAZ
A Closer Look at Data Types, Variables and Expressions
A Closer Look at Data Types, Variables and ExpressionsA Closer Look at Data Types, Variables and Expressions
A Closer Look at Data Types, Variables and Expressions
Inan Mashrur
data types in c programming language in detail
data types in c programming language in detaildata types in c programming language in detail
data types in c programming language in detail
atulk4360
PPS_unit_2_gtu_sem_2_year_2023_GTUU.pptx
PPS_unit_2_gtu_sem_2_year_2023_GTUU.pptxPPS_unit_2_gtu_sem_2_year_2023_GTUU.pptx
PPS_unit_2_gtu_sem_2_year_2023_GTUU.pptx
ZwecklosSe
cprogrammingdatatype using clangauge(1).ppt
cprogrammingdatatype using clangauge(1).pptcprogrammingdatatype using clangauge(1).ppt
cprogrammingdatatype using clangauge(1).ppt
ShirishaBuduputi
cprogrammingdata_type in with explanation.ppt
cprogrammingdata_type in with explanation.pptcprogrammingdata_type in with explanation.ppt
cprogrammingdata_type in with explanation.ppt
ShirishaBuduputi
cprogrammingdatatypesand differentdtatypes (1).ppt
cprogrammingdatatypesand differentdtatypes (1).pptcprogrammingdatatypesand differentdtatypes (1).ppt
cprogrammingdatatypesand differentdtatypes (1).ppt
ShirishaBuduputi

Recently uploaded (20)

LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...
VidyaAshokNemade
Distillation Types & It's Applications 1-Mar-2025.pptx
Distillation Types & It's Applications 1-Mar-2025.pptxDistillation Types & It's Applications 1-Mar-2025.pptx
Distillation Types & It's Applications 1-Mar-2025.pptx
mrcr123
"Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications""Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications"
GtxDriver
Scalling Rails: The Journey to 200M Notifications
Scalling Rails: The Journey to 200M NotificationsScalling Rails: The Journey to 200M Notifications
Scalling Rails: The Journey to 200M Notifications
Gustavo Araujo
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Priyanka Dange
02.BigDataAnalytics curso de Legsi (1).pdf
02.BigDataAnalytics curso de Legsi (1).pdf02.BigDataAnalytics curso de Legsi (1).pdf
02.BigDataAnalytics curso de Legsi (1).pdf
ruioliveira1921
CNC Technology Unit-2 for IV Year 24-25 MECH
CNC Technology Unit-2 for IV Year 24-25 MECHCNC Technology Unit-2 for IV Year 24-25 MECH
CNC Technology Unit-2 for IV Year 24-25 MECH
C Sai Kiran
Intro PPT SY_HONORS.pptx- Teaching scheme
Intro PPT SY_HONORS.pptx- Teaching schemeIntro PPT SY_HONORS.pptx- Teaching scheme
Intro PPT SY_HONORS.pptx- Teaching scheme
Priyanka Dange
windrose1.ppt for seminar of civil .pptx
windrose1.ppt for seminar of civil .pptxwindrose1.ppt for seminar of civil .pptx
windrose1.ppt for seminar of civil .pptx
nukeshpandey5678
PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...
PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...
PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...
yadavchandan322
UHV UNIT-5 IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...
UHV UNIT-5    IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...UHV UNIT-5    IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...
UHV UNIT-5 IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...
ariomthermal2031
CNC Technology Unit-5 for IV Year 24-25 MECH
CNC Technology Unit-5 for IV Year 24-25 MECHCNC Technology Unit-5 for IV Year 24-25 MECH
CNC Technology Unit-5 for IV Year 24-25 MECH
C Sai Kiran
Mastering Secure Login Mechanisms for React Apps.pdf
Mastering Secure Login Mechanisms for React Apps.pdfMastering Secure Login Mechanisms for React Apps.pdf
Mastering Secure Login Mechanisms for React Apps.pdf
Brion Mario
22PCOAM16 ML UNIT 2 NOTES & QB QUESTION WITH ANSWERS
22PCOAM16 ML UNIT 2 NOTES & QB QUESTION WITH ANSWERS22PCOAM16 ML UNIT 2 NOTES & QB QUESTION WITH ANSWERS
22PCOAM16 ML UNIT 2 NOTES & QB QUESTION WITH ANSWERS
Guru Nanak Technical Institutions
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
Guru Nanak Technical Institutions
sensors utilized in agro meteorology sdes
sensors utilized in agro meteorology sdessensors utilized in agro meteorology sdes
sensors utilized in agro meteorology sdes
Jenitha Rajadurai
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANEAirport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Priyanka Dange
Virtual Power plants-Cleantech-Revolution
Virtual Power plants-Cleantech-RevolutionVirtual Power plants-Cleantech-Revolution
Virtual Power plants-Cleantech-Revolution
Ashoka Saket
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...Self-Compacting Concrete: Composition, Properties, and Applications in Modern...
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...
NIT SILCHAR
CNC Technology Unit-4 for IV Year 24-25 MECH
CNC Technology Unit-4 for IV Year 24-25 MECHCNC Technology Unit-4 for IV Year 24-25 MECH
CNC Technology Unit-4 for IV Year 24-25 MECH
C Sai Kiran
LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...
VidyaAshokNemade
Distillation Types & It's Applications 1-Mar-2025.pptx
Distillation Types & It's Applications 1-Mar-2025.pptxDistillation Types & It's Applications 1-Mar-2025.pptx
Distillation Types & It's Applications 1-Mar-2025.pptx
mrcr123
"Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications""Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications"
GtxDriver
Scalling Rails: The Journey to 200M Notifications
Scalling Rails: The Journey to 200M NotificationsScalling Rails: The Journey to 200M Notifications
Scalling Rails: The Journey to 200M Notifications
Gustavo Araujo
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Priyanka Dange
02.BigDataAnalytics curso de Legsi (1).pdf
02.BigDataAnalytics curso de Legsi (1).pdf02.BigDataAnalytics curso de Legsi (1).pdf
02.BigDataAnalytics curso de Legsi (1).pdf
ruioliveira1921
CNC Technology Unit-2 for IV Year 24-25 MECH
CNC Technology Unit-2 for IV Year 24-25 MECHCNC Technology Unit-2 for IV Year 24-25 MECH
CNC Technology Unit-2 for IV Year 24-25 MECH
C Sai Kiran
Intro PPT SY_HONORS.pptx- Teaching scheme
Intro PPT SY_HONORS.pptx- Teaching schemeIntro PPT SY_HONORS.pptx- Teaching scheme
Intro PPT SY_HONORS.pptx- Teaching scheme
Priyanka Dange
windrose1.ppt for seminar of civil .pptx
windrose1.ppt for seminar of civil .pptxwindrose1.ppt for seminar of civil .pptx
windrose1.ppt for seminar of civil .pptx
nukeshpandey5678
PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...
PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...
PROJECT REPORT ON PASTA MACHINE - KP AUTOMATIONS - PASTA MAKING MACHINE PROJE...
yadavchandan322
UHV UNIT-5 IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...
UHV UNIT-5    IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...UHV UNIT-5    IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...
UHV UNIT-5 IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON ...
ariomthermal2031
CNC Technology Unit-5 for IV Year 24-25 MECH
CNC Technology Unit-5 for IV Year 24-25 MECHCNC Technology Unit-5 for IV Year 24-25 MECH
CNC Technology Unit-5 for IV Year 24-25 MECH
C Sai Kiran
Mastering Secure Login Mechanisms for React Apps.pdf
Mastering Secure Login Mechanisms for React Apps.pdfMastering Secure Login Mechanisms for React Apps.pdf
Mastering Secure Login Mechanisms for React Apps.pdf
Brion Mario
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
Guru Nanak Technical Institutions
sensors utilized in agro meteorology sdes
sensors utilized in agro meteorology sdessensors utilized in agro meteorology sdes
sensors utilized in agro meteorology sdes
Jenitha Rajadurai
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANEAirport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Priyanka Dange
Virtual Power plants-Cleantech-Revolution
Virtual Power plants-Cleantech-RevolutionVirtual Power plants-Cleantech-Revolution
Virtual Power plants-Cleantech-Revolution
Ashoka Saket
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...Self-Compacting Concrete: Composition, Properties, and Applications in Modern...
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...
NIT SILCHAR
CNC Technology Unit-4 for IV Year 24-25 MECH
CNC Technology Unit-4 for IV Year 24-25 MECHCNC Technology Unit-4 for IV Year 24-25 MECH
CNC Technology Unit-4 for IV Year 24-25 MECH
C Sai Kiran

Data types in C language

  • 1. Data types in C Enrollment no.170110107014 Kashyap Joshi Batch:1D07 G H Patel College of Engineering & Technology, V. V. Nagar, Academic Year: 2017-18 (Odd Sem.) Class: First Year Computer Engineering 2110003-COMPUTER PROGRAMMING & UTILIZATION
  • 2. Data types Basic definition of data type is a data storage format that can contain a specific type or range values. When computer data store in variables, each variables assigned specific data type.
  • 3. Types of data types 1.Primary (or fundamental) data types. 2.Derived data types. 3.User-defined data types.
  • 5. Integer Types Integers are the whole numbers with arrange of values supported by a particular machine. There are signed integers and unsigned integer. Signed integer used one bit for sign and other bits for magnitude of their number. Unsigned integers are always positive. It does not contain any bit for sign so that it occupies all the bit for the magnitude of the number. ANSI C has mainly three class of integer storage ,namely short integer, integer and long integer, in both signed and unsigned forms.
  • 6. Size and range of Data types on a 16-bit machine. Type Size(bits) Range Char or signed char 8 -128 to 127 Unsigned char 8 0 to 255 Int or signed int 16 -32,768 to 32,767 Unsigned int 16 0 to 65535 Short int or signed short int 8 -128 to 127 Unsigned short int 8 0 to 255 Long int or signed long int 32 -2,147,483,648 to 2,147,483,647 Unsigned long int 32 0 to 4,294,967,295
  • 7. Floating points types Floating point numbers are stored in 32 bits with 6 digits of precision . Floating point numbers are defined in C by the keyword float. When the accuracy provided by float is not sufficient double data type is used. It uses 64 bits giving a precision of 14 digits. When you want to extend more precision you can use the long double data type . Which uses 80 bits.
  • 8. Size and range of floating point types. Type Size(bits) Range Float 32 3.4E - 38 to 3.4E + 38 Double 64 1.7E 308 to 1.7E + 308 Long double 80 3.4E 4932 to 1.1E + 4932
  • 9. Void types The void type has no values. The type of the function is said to be void when it does not return any value to calling function. It can also play the role of generic type , meaning that it can represent any of the other standard types.
  • 10. Character types A single character can be defined as a character(char) type data. Characters are usually stored in 8-bits (one byte) of internal storage. The qualifier signed and unsigned may be explicitly applied to char. While unsigned chars have between 0 and 255,signed chars have values from -128 to 127.
  • 11. Typedef Using typedef keyword we can define our own user defined data type. Syntax: typedef type identifier; Example: typedef int marks; marks sub1,sub2;
  • 12. Enumeration Declare using keyword enum. Syntax: enum identifier {value1,value2,value3,,value N}; Example: enum day{Monday , Tuesday,,Sunday};