SlideShare ist ein Scribd-Unternehmen logo
1 von 17
VARIABLE & DATATYPE
Session 2
OBJECTIVES
• Discuss variables
•Differentiate between variables and constants
•List the different data types and make use of them
in C programs
• Discuss arithmetic operators
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
2
VARIABLE
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
3
VARIABLE EXAMPLE
• BEGIN
• DISPlAY ‘Enter 2 numbers’
• INPUT A, B
• C = A + B
• DISPLAY C
• END
A, B and C are variables in the pseudocode
BEGIN DISPlAY ‘Enter 2 numbers’ INPUT A, B C = A + B DISPLAY C END
Variable names takes away the need for a programmer to access memory locations using their address
The operating system takes care of allocating space for the variables
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
4
CONSTANT
• A constant is a value whose worth never changes.
• Example:
• 5 numeric / integer constant
• 5.3 numeric / float constant
• ‘Black’ string constant
• ‘C’ Character constant
• Variable holds constant values
• Int a=5;
• Char a=‘C’
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
5
IDENTIFIERS
• The names of variables, functions, labels, and various other user defined objects are
called identifiers
• Some correct identifier names
• arena
• s_count
• marks40
• class_one
• Some In correct identifier names
• 1sttest
• oh!god
• start...end
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
6
IDENTIFIERS
• Identifiers can be of any convenient length, but the number of characters in a
variable that are recognized by a compiler varies from compiler to compiler
• Identifiers in C are case sensitive
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
7
KEYWORD
All languages reserve certain words for their
internal use
Keywords hold a special meaning within the
context of the particular language
No problem of conflict as long as the keyword
and the variable name can be distinguished.
For example, having integer as a variable name
is perfectly valid even though it contains the
keyword int
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
8
DATA TYPES
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
9
o data type or
simply type is a
classification of data which
tells
the compiler or interpreter
how the programmer
intends to use the data.
o A data type provides a set
of values from which
an expression (i.e. variable,
function...) may take its
values.
INT DATA TYPE
• Stores numeric data
• int num;
• Cannot then store any other type of data like “Alan” or “abc”
• 16 bits (2 bytes)
• Integers in the range -32768 to 32767
•
• Examples:
• 12322,
• 0,
• -232
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
10
#include<stdio.h>
void main()
{
Int i=98;
Int j=-67;
}
FLOAT
Stores values containing decimal places
float num;
 Precision of upto 6 digits
32 bits (4 bytes) of memory
Examples:
23.05,
 56.5,
 32
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
11
#include<stdio.h>
void main()
{
Float var=
28.00006;
}
DOUBLE
• Stores values containing decimal places
• double num;
• Precision of upto 10 digits
• 64 bits (8 bytes) of memory
• Examples: ‘a’, ‘m’, ‘$’ ‘%’ , ‘1’, ’5’
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
12
#include<stdio.h>
void main()
{
DOUBLE var=
’28%’;
}
CHAR
• Stores a single character of information
• char gender; gender='M';
• 8 bits (1 byte) of memory
• Examples: ‘a’, ‘m’, ‘$’ ‘%’ , ‘1’, ’5’
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
13
#include<stdio.h>
void main()
{
Char var= ’X’;
}
VOID
• Stores nothing
• Indicates the compiler that there is nothing to expect
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
14
RANGE
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
15
DECLARING VARIABLE
main ()
{
char abc; /*abc of type character */
int xyz; /*xyz of type integer */
float length; /*length of type float */
double area; /*area of type double */
long liteyrs; /*liteyrs of type long int */
short arm; /*arm of type short integer*/ }
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
16
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
17

Weitere ähnliche Inhalte

Was ist angesagt?

C++ PROGRAMMING BASICS
C++ PROGRAMMING BASICSC++ PROGRAMMING BASICS
C++ PROGRAMMING BASICS
Aami Kakakhel
 
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
 

Was ist angesagt? (20)

C++ Tokens
C++ TokensC++ Tokens
C++ Tokens
 
Assignment
AssignmentAssignment
Assignment
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
 
45 Days C++ Programming Language Training in Ambala
45 Days C++ Programming Language Training in Ambala45 Days C++ Programming Language Training in Ambala
45 Days C++ Programming Language Training in Ambala
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++
 
Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C Programming
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
C++ PROGRAMMING BASICS
C++ PROGRAMMING BASICSC++ PROGRAMMING BASICS
C++ PROGRAMMING BASICS
 
Data type
Data typeData type
Data type
 
Learn C LANGUAGE at ASIT
Learn C LANGUAGE at ASITLearn C LANGUAGE at ASIT
Learn C LANGUAGE at ASIT
 
Variables and data types in C++
Variables and data types in C++Variables and data types in C++
Variables and data types in C++
 
Constant and variacles in c
Constant   and variacles in cConstant   and variacles in c
Constant and variacles in c
 
primitive data types
 primitive data types primitive data types
primitive data types
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
C language
C languageC language
C language
 
constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in C
 
C++ Programming Language Training in Ambala ! Batra Computer Centre
C++ Programming Language Training in Ambala ! Batra Computer CentreC++ Programming Language Training in Ambala ! Batra Computer Centre
C++ Programming Language Training in Ambala ! Batra Computer Centre
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
C Programming Introduction
C Programming IntroductionC Programming Introduction
C Programming Introduction
 

Ähnlich wie C programming Tutorial Session 2

Chap_________________1_Introduction.pptx
Chap_________________1_Introduction.pptxChap_________________1_Introduction.pptx
Chap_________________1_Introduction.pptx
Ronaldo Aditya
 

Ähnlich wie C programming Tutorial Session 2 (20)

Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptxDATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
 
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptxDATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
 
02. Primitive Data Types and Variables
02. Primitive Data Types and Variables02. Primitive Data Types and Variables
02. Primitive Data Types and Variables
 
programming week 2.ppt
programming week 2.pptprogramming week 2.ppt
programming week 2.ppt
 
Theory1&amp;2
Theory1&amp;2Theory1&amp;2
Theory1&amp;2
 
C#
C#C#
C#
 
C++ ch2
C++ ch2C++ ch2
C++ ch2
 
work.ppt it describes about programming fundamentals
work.ppt it describes about programming fundamentalswork.ppt it describes about programming fundamentals
work.ppt it describes about programming fundamentals
 
Ch12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfCh12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdf
 
Programming in C [Module One]
Programming in C [Module One]Programming in C [Module One]
Programming in C [Module One]
 
Chap_________________1_Introduction.pptx
Chap_________________1_Introduction.pptxChap_________________1_Introduction.pptx
Chap_________________1_Introduction.pptx
 
Object Oriented Programming using C++ - Part 4
Object Oriented Programming using C++ - Part 4Object Oriented Programming using C++ - Part 4
Object Oriented Programming using C++ - Part 4
 
Cpa lecture (theory) 02_
Cpa lecture (theory) 02_Cpa lecture (theory) 02_
Cpa lecture (theory) 02_
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
02 Primitive data types and variables
02 Primitive data types and variables02 Primitive data types and variables
02 Primitive data types and variables
 
Matlab numbers
Matlab numbersMatlab numbers
Matlab numbers
 
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.ppt
 
Chapter 2.datatypes and operators
Chapter 2.datatypes and operatorsChapter 2.datatypes and operators
Chapter 2.datatypes and operators
 
Int64
Int64Int64
Int64
 

Mehr von Muhammad Ehtisham Siddiqui

Mehr von Muhammad Ehtisham Siddiqui (20)

C programming Tutorial Session 4
C programming Tutorial Session 4C programming Tutorial Session 4
C programming Tutorial Session 4
 
HTML5 Web storage
HTML5 Web storageHTML5 Web storage
HTML5 Web storage
 
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham SiddiquiJ Query (Complete Course) by Muhammad Ehtisham Siddiqui
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
 
JavaScript Session 2
JavaScript Session 2JavaScript Session 2
JavaScript Session 2
 
JavaScript Session 3
JavaScript Session 3JavaScript Session 3
JavaScript Session 3
 
Javascript session 1
Javascript session 1Javascript session 1
Javascript session 1
 
Html audio video
Html audio videoHtml audio video
Html audio video
 
Html 5 geolocation api
Html 5 geolocation api Html 5 geolocation api
Html 5 geolocation api
 
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham SiddiquiBuiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
 
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation  Websites Session 7 by Muhammad Ehtisham SiddiquiBuilding Next Generation  Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
 
Building Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 6 by Muhammad Ehtisham SiddiquiBuilding Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
 
Building Next Generation Websites by Muhammad Ehtisham Siddiqui
Building Next Generation Websites by Muhammad Ehtisham SiddiquiBuilding Next Generation Websites by Muhammad Ehtisham Siddiqui
Building Next Generation Websites by Muhammad Ehtisham Siddiqui
 
Building Next Generation Websites Session6
Building Next Generation Websites Session6Building Next Generation Websites Session6
Building Next Generation Websites Session6
 
Building Next Generation Websites Session5
Building Next Generation Websites Session5Building Next Generation Websites Session5
Building Next Generation Websites Session5
 
Building Next Generation Websites Session4
Building Next Generation Websites Session4Building Next Generation Websites Session4
Building Next Generation Websites Session4
 
Session4
Session4Session4
Session4
 
Office session14
Office session14Office session14
Office session14
 
Office session13
Office session13Office session13
Office session13
 
Office session12
Office session12Office session12
Office session12
 
Office session11
Office session11Office session11
Office session11
 

Kürzlich hochgeladen

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Kürzlich hochgeladen (20)

%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 

C programming Tutorial Session 2

  • 2. OBJECTIVES • Discuss variables •Differentiate between variables and constants •List the different data types and make use of them in C programs • Discuss arithmetic operators Presented by: Muhammad Ehtisham Siddiqui (BSCS) 2
  • 3. VARIABLE Presented by: Muhammad Ehtisham Siddiqui (BSCS) 3
  • 4. VARIABLE EXAMPLE • BEGIN • DISPlAY ‘Enter 2 numbers’ • INPUT A, B • C = A + B • DISPLAY C • END A, B and C are variables in the pseudocode BEGIN DISPlAY ‘Enter 2 numbers’ INPUT A, B C = A + B DISPLAY C END Variable names takes away the need for a programmer to access memory locations using their address The operating system takes care of allocating space for the variables Presented by: Muhammad Ehtisham Siddiqui (BSCS) 4
  • 5. CONSTANT • A constant is a value whose worth never changes. • Example: • 5 numeric / integer constant • 5.3 numeric / float constant • ‘Black’ string constant • ‘C’ Character constant • Variable holds constant values • Int a=5; • Char a=‘C’ Presented by: Muhammad Ehtisham Siddiqui (BSCS) 5
  • 6. IDENTIFIERS • The names of variables, functions, labels, and various other user defined objects are called identifiers • Some correct identifier names • arena • s_count • marks40 • class_one • Some In correct identifier names • 1sttest • oh!god • start...end Presented by: Muhammad Ehtisham Siddiqui (BSCS) 6
  • 7. IDENTIFIERS • Identifiers can be of any convenient length, but the number of characters in a variable that are recognized by a compiler varies from compiler to compiler • Identifiers in C are case sensitive Presented by: Muhammad Ehtisham Siddiqui (BSCS) 7
  • 8. KEYWORD All languages reserve certain words for their internal use Keywords hold a special meaning within the context of the particular language No problem of conflict as long as the keyword and the variable name can be distinguished. For example, having integer as a variable name is perfectly valid even though it contains the keyword int Presented by: Muhammad Ehtisham Siddiqui (BSCS) 8
  • 9. DATA TYPES Presented by: Muhammad Ehtisham Siddiqui (BSCS) 9 o data type or simply type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data. o A data type provides a set of values from which an expression (i.e. variable, function...) may take its values.
  • 10. INT DATA TYPE • Stores numeric data • int num; • Cannot then store any other type of data like “Alan” or “abc” • 16 bits (2 bytes) • Integers in the range -32768 to 32767 • • Examples: • 12322, • 0, • -232 Presented by: Muhammad Ehtisham Siddiqui (BSCS) 10 #include<stdio.h> void main() { Int i=98; Int j=-67; }
  • 11. FLOAT Stores values containing decimal places float num;  Precision of upto 6 digits 32 bits (4 bytes) of memory Examples: 23.05,  56.5,  32 Presented by: Muhammad Ehtisham Siddiqui (BSCS) 11 #include<stdio.h> void main() { Float var= 28.00006; }
  • 12. DOUBLE • Stores values containing decimal places • double num; • Precision of upto 10 digits • 64 bits (8 bytes) of memory • Examples: ‘a’, ‘m’, ‘$’ ‘%’ , ‘1’, ’5’ Presented by: Muhammad Ehtisham Siddiqui (BSCS) 12 #include<stdio.h> void main() { DOUBLE var= ’28%’; }
  • 13. CHAR • Stores a single character of information • char gender; gender='M'; • 8 bits (1 byte) of memory • Examples: ‘a’, ‘m’, ‘$’ ‘%’ , ‘1’, ’5’ Presented by: Muhammad Ehtisham Siddiqui (BSCS) 13 #include<stdio.h> void main() { Char var= ’X’; }
  • 14. VOID • Stores nothing • Indicates the compiler that there is nothing to expect Presented by: Muhammad Ehtisham Siddiqui (BSCS) 14
  • 15. RANGE Presented by: Muhammad Ehtisham Siddiqui (BSCS) 15
  • 16. DECLARING VARIABLE main () { char abc; /*abc of type character */ int xyz; /*xyz of type integer */ float length; /*length of type float */ double area; /*area of type double */ long liteyrs; /*liteyrs of type long int */ short arm; /*arm of type short integer*/ } Presented by: Muhammad Ehtisham Siddiqui (BSCS) 16
  • 17. Presented by: Muhammad Ehtisham Siddiqui (BSCS) 17