SlideShare une entreprise Scribd logo
1  sur  20
DATA TYPES In C++ , data are mainly divided into three different types. These are: 1. Character  type data 2. Integer type data            3. Real data type
1. Character data type: Characters (letters, digits and punctuation character) Are represented by the “char” data type. The “short” data type is the same size as “ char” ,usually one byte.
	Character data type: Character data type must be signed and unsigned (either short or long). Both occupying one byte each, but have different ranges. To begin with, it might appear strange as to how a char can have a sign. Consider the statement Char ch=‘A’ Char ty=‘B’ Char ze=‘D’ etc.
Character data type: A signed char is same as an ordinary char and has a range from -128 	to  +127: where as, unsigned char  has a range from 0 to 255. let us now see a program below #include<conio.h> #include<stdio.h> #include<stdlib.h> Void main() { Char ch=291; Printf(“%c”,ch); Getch(); }
2. Integer data type: Integer data type (whole numbers) are represented by “int”. Some time, we know in advance that the value stored in a given integer variable will always be positive when it is being used to only count things. We can declared it as below. Int a=20; Int b=40; Int c=30; etc
3: Float data type: Those number which are in decimal fraction are represented by “float”. We can show float numbers in printf statement of C++ by “%f”. Float number are declared as Float a=“40.00” Float b=“23.04” Float c=“10.3” etc
Float data type: We can write a program as: #include<conio.h> #include<stdio.h> #include<stdlib.h> Void main() { Float a=29.1; Printf(“%f”,a); Getch(); }
Integer data type: We can write a program in C++ are as shown below. #include<conio.h> #include<stdio.h> #include<stdlib.h> Void main() { Int a=291; Printf(“%d”,a); Getch(); } We can show the integer data type in C|C++ by “%d”  in printf statement.
CONSTANTS: Unlike variable, a constant is a fixed value that does not change during the execution of program. We can say that constant is a values while variable are holders of these values. In C|C++, a constant may be divided into main two types. Numeric constant. Non-numeric constant.
NUMERIC CONSTANT: Numbers are referred to as numeric constants. Numeric constants are used for numeric purposes. It contain: Numeric digits 0 to 9. Plus(+) or minus(-) signs. Decimal points It is important to that note no commas or blanks are allowed in numeric constants.
In C|C++, numeric constant can be represented in three ways. Integer constant Floating constant Exponential real constant
OCTAL INTEGER CONSTANT: In C|C++ , any integer constant with a leading 0, is interpreted as Octal constant an octal constant is a base 8 numbers system and valid digits in octal system are only 0 through 7. it is important to note that in C|C++ , decimal integer constant cannot start with a leading 0.
HEXADECIMAL INTEGER CONSTANT In C++ any integer constant, which begins with 0x or 0X, is interpreted as hexadecimal integer constant. An hexadecimal constant is a base -16 number and valid digit in hexadecimal system are 0 through 9,A,B,C,D,E and F.
FLOATING POINT CONSTANT: The numeric constant, which does not contain a decimal point is known as floating point constant. Like integer constant, floating points could either be positive or negative.
NON NUMERIC CONSTANT: Non numeric constant are used for non numeric purposes. Such as to produce output reports, heading or printing messages etc, non numeric constant are divided into two types. Character constant String constant
EXPONENTIAL REAL CONSTANT: Floating point constant can also be represented in the E-notation form, and this type of numeric constant is known as exponential real constant.
CHARACTER CONSTANT: In C++, character constant are enclosed within single quotes. It is important to note that the single quotes are not part of the character constant, but they serve to delimit it.
STRING CONSTANT: Any character or sequence of character between double quotes is known as string constant or simply a string.
ZAHID HUSSAIN Class no : 	322 Subject :	Data types, Constants Shift :	Evening Submitted to UMAR ALI SIR

Contenu connexe

Tendances

Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C ProgrammingQazi Shahzad Ali
 
Computer data type and Terminologies
Computer data type and Terminologies Computer data type and Terminologies
Computer data type and Terminologies glyvive
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operatorsraksharao
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programmingHarshita Yadav
 
Concept of c data types
Concept of c data typesConcept of c data types
Concept of c data typesManisha Keim
 
2 expressions (ppt-2) in C++
2 expressions (ppt-2) in C++2 expressions (ppt-2) in C++
2 expressions (ppt-2) in C++Kuntal Bhowmick
 
3 data-types-in-c
3 data-types-in-c3 data-types-in-c
3 data-types-in-cteach4uin
 
Basic Data Types in C++
Basic Data Types in C++ Basic Data Types in C++
Basic Data Types in C++ Hridoy Bepari
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++Neeru Mittal
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c languageRai University
 
Constants and variables in c programming
Constants and variables in c programmingConstants and variables in c programming
Constants and variables in c programmingChitrank Dixit
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programmingprogramming9
 
Data types in C language
Data types in C languageData types in C language
Data types in C languagekashyap399
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C ProgrammingKamal Acharya
 

Tendances (20)

Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C Programming
 
C++ data types
C++ data typesC++ data types
C++ data types
 
Computer data type and Terminologies
Computer data type and Terminologies Computer data type and Terminologies
Computer data type and Terminologies
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programming
 
Concept of c data types
Concept of c data typesConcept of c data types
Concept of c data types
 
2 expressions (ppt-2) in C++
2 expressions (ppt-2) in C++2 expressions (ppt-2) in C++
2 expressions (ppt-2) in C++
 
Data types
Data typesData types
Data types
 
Data type in c
Data type in cData type in c
Data type in c
 
3 data-types-in-c
3 data-types-in-c3 data-types-in-c
3 data-types-in-c
 
Basic Data Types in C++
Basic Data Types in C++ Basic Data Types in C++
Basic Data Types in C++
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
 
Constants and variables in c programming
Constants and variables in c programmingConstants and variables in c programming
Constants and variables in c programming
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
 
Data types in C language
Data types in C languageData types in C language
Data types in C language
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
 
Numerical data.
Numerical data.Numerical data.
Numerical data.
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
 
Data type
Data typeData type
Data type
 

Similaire à Data types

Object Oriented Programming with C++
Object Oriented Programming with C++Object Oriented Programming with C++
Object Oriented Programming with C++Rokonuzzaman Rony
 
C presentation book
C presentation bookC presentation book
C presentation bookkrunal1210
 
Bsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageBsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageRai University
 
Btech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c languageBtech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c languageRai University
 
Mca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c languageMca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c languageRai University
 
Diploma ii cfpc u-2 datatypes and variables in c language
Diploma ii  cfpc u-2 datatypes and variables in c languageDiploma ii  cfpc u-2 datatypes and variables in c language
Diploma ii cfpc u-2 datatypes and variables in c languageRai University
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorialMohit Saini
 
presentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxpresentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxKrishanPalSingh39
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++K Durga Prasad
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C ProgrammingMOHAMAD NOH AHMAD
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 FocJAYA
 
INTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptxINTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptxMamataAnilgod
 

Similaire à Data types (20)

C Token’s
C Token’sC Token’s
C Token’s
 
Module 1 PCD.docx
Module 1 PCD.docxModule 1 PCD.docx
Module 1 PCD.docx
 
Object Oriented Programming with C++
Object Oriented Programming with C++Object Oriented Programming with C++
Object Oriented Programming with C++
 
C++
C++C++
C++
 
C presentation book
C presentation bookC presentation book
C presentation book
 
CHAPTER 2
CHAPTER 2CHAPTER 2
CHAPTER 2
 
Bsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageBsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c language
 
Btech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c languageBtech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c language
 
Mca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c languageMca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c language
 
Diploma ii cfpc u-2 datatypes and variables in c language
Diploma ii  cfpc u-2 datatypes and variables in c languageDiploma ii  cfpc u-2 datatypes and variables in c language
Diploma ii cfpc u-2 datatypes and variables in c language
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 
presentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptxpresentation_data_types_and_operators_1513499834_241350.pptx
presentation_data_types_and_operators_1513499834_241350.pptx
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
 
Basic of c &c++
Basic of c &c++Basic of c &c++
Basic of c &c++
 
Lecture 6- Intorduction to C Programming
Lecture 6- Intorduction to C ProgrammingLecture 6- Intorduction to C Programming
Lecture 6- Intorduction to C Programming
 
INTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptxINTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptx
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 

Dernier

College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...perfect solution
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...aamir
 
VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130
VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130
VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130Suhani Kapoor
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...aamir
 
Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...
Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...
Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...Riya Pathan
 
VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...
VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...
VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...anamikaraghav4
 
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolVIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolRiya Pathan
 
Call Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service NashikCall Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service KolhapurVIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service KolhapurRiya Pathan
 
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaRiya Pathan
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...noor ahmed
 
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...Riya Pathan
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Riya Pathan
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Riya Pathan
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsApsara Of India
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...noor ahmed
 

Dernier (20)

College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 
VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130
VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130
VIP Call Girls Service Banjara Hills Hyderabad Call +91-8250192130
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
 
Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...
Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...
Call Girls Jodhpur Park - [ Cash on Delivery ] Contact 8250192130 Escorts Ser...
 
VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...
VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...
VIP Call Girls Sonagachi - 8250192130 Escorts Service 50% Off with Cash ON De...
 
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolVIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
 
Call Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service NashikCall Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
 
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
 
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service KolhapurVIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
VIP Call Girl Kolhapur Aashi 8250192130 Independent Escort Service Kolhapur
 
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
 
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
 
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
 

Data types

  • 1. DATA TYPES In C++ , data are mainly divided into three different types. These are: 1. Character type data 2. Integer type data 3. Real data type
  • 2. 1. Character data type: Characters (letters, digits and punctuation character) Are represented by the “char” data type. The “short” data type is the same size as “ char” ,usually one byte.
  • 3. Character data type: Character data type must be signed and unsigned (either short or long). Both occupying one byte each, but have different ranges. To begin with, it might appear strange as to how a char can have a sign. Consider the statement Char ch=‘A’ Char ty=‘B’ Char ze=‘D’ etc.
  • 4. Character data type: A signed char is same as an ordinary char and has a range from -128 to +127: where as, unsigned char has a range from 0 to 255. let us now see a program below #include<conio.h> #include<stdio.h> #include<stdlib.h> Void main() { Char ch=291; Printf(“%c”,ch); Getch(); }
  • 5. 2. Integer data type: Integer data type (whole numbers) are represented by “int”. Some time, we know in advance that the value stored in a given integer variable will always be positive when it is being used to only count things. We can declared it as below. Int a=20; Int b=40; Int c=30; etc
  • 6. 3: Float data type: Those number which are in decimal fraction are represented by “float”. We can show float numbers in printf statement of C++ by “%f”. Float number are declared as Float a=“40.00” Float b=“23.04” Float c=“10.3” etc
  • 7. Float data type: We can write a program as: #include<conio.h> #include<stdio.h> #include<stdlib.h> Void main() { Float a=29.1; Printf(“%f”,a); Getch(); }
  • 8. Integer data type: We can write a program in C++ are as shown below. #include<conio.h> #include<stdio.h> #include<stdlib.h> Void main() { Int a=291; Printf(“%d”,a); Getch(); } We can show the integer data type in C|C++ by “%d” in printf statement.
  • 9. CONSTANTS: Unlike variable, a constant is a fixed value that does not change during the execution of program. We can say that constant is a values while variable are holders of these values. In C|C++, a constant may be divided into main two types. Numeric constant. Non-numeric constant.
  • 10. NUMERIC CONSTANT: Numbers are referred to as numeric constants. Numeric constants are used for numeric purposes. It contain: Numeric digits 0 to 9. Plus(+) or minus(-) signs. Decimal points It is important to that note no commas or blanks are allowed in numeric constants.
  • 11. In C|C++, numeric constant can be represented in three ways. Integer constant Floating constant Exponential real constant
  • 12.
  • 13. OCTAL INTEGER CONSTANT: In C|C++ , any integer constant with a leading 0, is interpreted as Octal constant an octal constant is a base 8 numbers system and valid digits in octal system are only 0 through 7. it is important to note that in C|C++ , decimal integer constant cannot start with a leading 0.
  • 14. HEXADECIMAL INTEGER CONSTANT In C++ any integer constant, which begins with 0x or 0X, is interpreted as hexadecimal integer constant. An hexadecimal constant is a base -16 number and valid digit in hexadecimal system are 0 through 9,A,B,C,D,E and F.
  • 15. FLOATING POINT CONSTANT: The numeric constant, which does not contain a decimal point is known as floating point constant. Like integer constant, floating points could either be positive or negative.
  • 16. NON NUMERIC CONSTANT: Non numeric constant are used for non numeric purposes. Such as to produce output reports, heading or printing messages etc, non numeric constant are divided into two types. Character constant String constant
  • 17. EXPONENTIAL REAL CONSTANT: Floating point constant can also be represented in the E-notation form, and this type of numeric constant is known as exponential real constant.
  • 18. CHARACTER CONSTANT: In C++, character constant are enclosed within single quotes. It is important to note that the single quotes are not part of the character constant, but they serve to delimit it.
  • 19. STRING CONSTANT: Any character or sequence of character between double quotes is known as string constant or simply a string.
  • 20. ZAHID HUSSAIN Class no : 322 Subject : Data types, Constants Shift : Evening Submitted to UMAR ALI SIR