SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
C-Programming Tutorials
N.V.Raja Sekhar Reddy
www.programming9.com
VARIABLES
1 www.programming9.com
Variables in C
 Variables are names used to refer to some memory
locations of computer.
 The piece of information stored at this location is
referred as value of a variable.
 The variables are not fixed values and might change
during the execution of a program.
2 www.programming9.com
Syntax to declare a variable
 Syntax:
Datatype Variablename;
int d;
float a,b;
double f;
char ch; etc.,
3 www.programming9.com
Defining a Variable
int a=10, b=20;
float f=23.145;
double d=20.0;
char ch='x';
4 www.programming9.com
In RAM (Physical Memory)
5 www.programming9.com
Rules for using Variables
 The variable name can contain letters, digits and the
underscore ( _) .
 The first character of the variable name must be a letter
or underscore ( _).
 Variable name must not be the same as C reserved
words or keywords.
 It should not contain white spaces.
6 www.programming9.com
Brought You By
www.programming9.com
7 www.programming9.com

More Related Content

What's hot (20)

PPTX
C Programming: Control Structure
Sokngim Sa
 
PPTX
Function in C program
Nurul Zakiah Zamri Tan
 
PPTX
Pointers in C Programming
Jasleen Kaur (Chandigarh University)
 
PPTX
Programming in c Arrays
janani thirupathi
 
PPTX
Pointers in c++
sai tarlekar
 
PPTX
Loops in C Programming Language
Mahantesh Devoor
 
PPTX
Functions in c language
tanmaymodi4
 
PPTX
Data types in c++
Venkata.Manish Reddy
 
PPTX
C functions
University of Potsdam
 
PPTX
C tokens
Manu1325
 
PPTX
Control statements in c
Sathish Narayanan
 
PPTX
data types in C programming
Harshita Yadav
 
PPTX
Storage class in C Language
Nitesh Kumar Pandey
 
PPTX
The Loops
Krishma Parekh
 
PPT
Strings
Mitali Chugh
 
PPSX
Break and continue
Frijo Francis
 
PPTX
Functions in C
Kamal Acharya
 
PDF
Operators in c programming
savitamhaske
 
PPTX
Union in C programming
Kamal Acharya
 
PPT
constants, variables and datatypes in C
Sahithi Naraparaju
 
C Programming: Control Structure
Sokngim Sa
 
Function in C program
Nurul Zakiah Zamri Tan
 
Pointers in C Programming
Jasleen Kaur (Chandigarh University)
 
Programming in c Arrays
janani thirupathi
 
Pointers in c++
sai tarlekar
 
Loops in C Programming Language
Mahantesh Devoor
 
Functions in c language
tanmaymodi4
 
Data types in c++
Venkata.Manish Reddy
 
C tokens
Manu1325
 
Control statements in c
Sathish Narayanan
 
data types in C programming
Harshita Yadav
 
Storage class in C Language
Nitesh Kumar Pandey
 
The Loops
Krishma Parekh
 
Strings
Mitali Chugh
 
Break and continue
Frijo Francis
 
Functions in C
Kamal Acharya
 
Operators in c programming
savitamhaske
 
Union in C programming
Kamal Acharya
 
constants, variables and datatypes in C
Sahithi Naraparaju
 

Viewers also liked (13)

PPTX
datatypes and variables in c language
Rai University
 
PPSX
INTRODUCTION TO C PROGRAMMING
Abhishek Dwivedi
 
PDF
Programming in c
edudivya
 
PDF
TD-666-01-teknik-pemrograman
Tino Dwiantoro
 
PDF
Chap 2 c++
Widad Jamaluddin
 
PDF
Analisa matriks
Saedi Saputra Siagian
 
PDF
Mat.01.matrik
Okta Chandra RK
 
PPTX
Variables in C and C++ Language
Way2itech
 
PPT
Pt 2 matriks1-rev
lecturer
 
PDF
Programming in c++
Christalin Nelson
 
PDF
Belajar netbeans java pemula dari 0 sampai mahir
harisonmtd
 
PPT
C ppt
jasmeen kr
 
PPT
Basics of C programming
avikdhupar
 
datatypes and variables in c language
Rai University
 
INTRODUCTION TO C PROGRAMMING
Abhishek Dwivedi
 
Programming in c
edudivya
 
TD-666-01-teknik-pemrograman
Tino Dwiantoro
 
Chap 2 c++
Widad Jamaluddin
 
Analisa matriks
Saedi Saputra Siagian
 
Mat.01.matrik
Okta Chandra RK
 
Variables in C and C++ Language
Way2itech
 
Pt 2 matriks1-rev
lecturer
 
Programming in c++
Christalin Nelson
 
Belajar netbeans java pemula dari 0 sampai mahir
harisonmtd
 
C ppt
jasmeen kr
 
Basics of C programming
avikdhupar
 
Ad

Similar to Variables in C Programming (20)

PDF
Fundamental of Programming Language UNIT-I
TruptiWable1
 
PPTX
C language variables
marar hina
 
PPTX
C PROGRAMING.pptx
MohammedtajuddinTaju
 
PPTX
cs3362 c programming and data structures
UdhayaSankar13
 
PPTX
C Programming and Data structure C Programming and Data structures
UdhayaSankar13
 
PPTX
C language updated
Arafat Bin Reza
 
PPTX
Computer programming - variables constants operators expressions and statements
John Paul Espino
 
PPT
Escape Sequences and Variables
yarkhosh
 
DOCX
C programming perso notes
Melanie Tsopze
 
PDF
C programming language tutorial for beginers.pdf
ComedyTechnology
 
PPT
Introduction To C
gscprasad1111
 
PPTX
programming for problem solving in C and C++.pptx
BamaSivasubramanianP
 
PDF
UNIT1 PPS of C language for first year first semester
Aariz2
 
PPTX
C tokens
Megha Sharma
 
PPTX
C programming
AsifRahaman16
 
PPTX
C
PRADEEPA R
 
PPTX
PLF-Lesson tsu lecture time 2 units-2.pptx
MattFlordeliza1
 
PPT
1. overview of c
amar kakde
 
PDF
PROGRAMMING IN C UNIT II.pdfFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
dinesh620610
 
PPTX
cunit1.pptx
zeenatparveen24
 
Fundamental of Programming Language UNIT-I
TruptiWable1
 
C language variables
marar hina
 
C PROGRAMING.pptx
MohammedtajuddinTaju
 
cs3362 c programming and data structures
UdhayaSankar13
 
C Programming and Data structure C Programming and Data structures
UdhayaSankar13
 
C language updated
Arafat Bin Reza
 
Computer programming - variables constants operators expressions and statements
John Paul Espino
 
Escape Sequences and Variables
yarkhosh
 
C programming perso notes
Melanie Tsopze
 
C programming language tutorial for beginers.pdf
ComedyTechnology
 
Introduction To C
gscprasad1111
 
programming for problem solving in C and C++.pptx
BamaSivasubramanianP
 
UNIT1 PPS of C language for first year first semester
Aariz2
 
C tokens
Megha Sharma
 
C programming
AsifRahaman16
 
PLF-Lesson tsu lecture time 2 units-2.pptx
MattFlordeliza1
 
1. overview of c
amar kakde
 
PROGRAMMING IN C UNIT II.pdfFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
dinesh620610
 
cunit1.pptx
zeenatparveen24
 
Ad

Recently uploaded (20)

PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
Council of Chalcedon Re-Examined
Smiling Lungs
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
Introduction to Indian Writing in English
Trushali Dodiya
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Horarios de distribución de agua en julio
pegazohn1978
 
Council of Chalcedon Re-Examined
Smiling Lungs
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
epi editorial commitee meeting presentation
MIPLM
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 

Variables in C Programming

  • 1. C-Programming Tutorials N.V.Raja Sekhar Reddy www.programming9.com VARIABLES 1 www.programming9.com
  • 2. Variables in C  Variables are names used to refer to some memory locations of computer.  The piece of information stored at this location is referred as value of a variable.  The variables are not fixed values and might change during the execution of a program. 2 www.programming9.com
  • 3. Syntax to declare a variable  Syntax: Datatype Variablename; int d; float a,b; double f; char ch; etc., 3 www.programming9.com
  • 4. Defining a Variable int a=10, b=20; float f=23.145; double d=20.0; char ch='x'; 4 www.programming9.com
  • 5. In RAM (Physical Memory) 5 www.programming9.com
  • 6. Rules for using Variables  The variable name can contain letters, digits and the underscore ( _) .  The first character of the variable name must be a letter or underscore ( _).  Variable name must not be the same as C reserved words or keywords.  It should not contain white spaces. 6 www.programming9.com