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

PPT
Basics of Electrocardiography(ECG)
PPTX
C language ppt
PPT
c-programming
PDF
Datatypes in python
PPTX
Blood Pressure Measurement
PPT
Operators in C Programming
PPTX
Apps of thin films
PPTX
Intellectual property rights
Basics of Electrocardiography(ECG)
C language ppt
c-programming
Datatypes in python
Blood Pressure Measurement
Operators in C Programming
Apps of thin films
Intellectual property rights

What's hot (20)

PPTX
Variables in C++, data types in c++
PPTX
Tokens in C++
PPTX
Variables in C and C++ Language
PPTX
Functions in C
PPTX
C tokens
PPTX
Inheritance in c++
PPT
Function overloading(c++)
PPT
structure and union
PPTX
Data types in c++
PPTX
Character set of c
PPTX
Preprocessor directives in c language
PPTX
Pointers in C Programming
PPT
Constants in C Programming
PPTX
C Tokens
PPTX
Presentation on Function in C Programming
PPT
constants, variables and datatypes in C
PPTX
Function in C program
PPTX
Storage class in C Language
PPTX
Introduction of c programming
PPTX
Inheritance in java
Variables in C++, data types in c++
Tokens in C++
Variables in C and C++ Language
Functions in C
C tokens
Inheritance in c++
Function overloading(c++)
structure and union
Data types in c++
Character set of c
Preprocessor directives in c language
Pointers in C Programming
Constants in C Programming
C Tokens
Presentation on Function in C Programming
constants, variables and datatypes in C
Function in C program
Storage class in C Language
Introduction of c programming
Inheritance in java
Ad

Viewers also liked (13)

PPTX
datatypes and variables in c language
PPSX
INTRODUCTION TO C PROGRAMMING
PPTX
Data Types and Variables In C Programming
PDF
Programming in c
PDF
TD-666-01-teknik-pemrograman
PDF
Chap 2 c++
PDF
Analisa matriks
PDF
Mat.01.matrik
PPT
Pt 2 matriks1-rev
PDF
Programming in c++
PDF
Belajar netbeans java pemula dari 0 sampai mahir
PPT
C ppt
PPT
Basics of C programming
datatypes and variables in c language
INTRODUCTION TO C PROGRAMMING
Data Types and Variables In C Programming
Programming in c
TD-666-01-teknik-pemrograman
Chap 2 c++
Analisa matriks
Mat.01.matrik
Pt 2 matriks1-rev
Programming in c++
Belajar netbeans java pemula dari 0 sampai mahir
C ppt
Basics of C programming
Ad

Similar to Variables in C Programming (20)

PPTX
programming for problem solving in C and C++.pptx
PPTX
Computer programming(CP)
PPT
5 introduction-to-c
PPTX
Unit 2- Module 2.pptx
PDF
C programming
PPTX
Programming construction tools
PDF
The New Yorker cartoon premium membership of the
PPTX
Features and Fundamentals of C Language for Beginners
PPTX
C language variables
ODP
CProgrammingTutorial
PPTX
2. introduction of a c program
PDF
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
PPTX
C Programming and Data structure C Programming and Data structures
PPTX
cs3362 c programming and data structures
PPTX
Interview Questions For C Language .pptx
PPTX
Introduction%20C.pptx
PPTX
unit 1 cpds.pptx
PDF
PSPC--UNIT-2.pdf
PDF
Interview Questions For C Language
programming for problem solving in C and C++.pptx
Computer programming(CP)
5 introduction-to-c
Unit 2- Module 2.pptx
C programming
Programming construction tools
The New Yorker cartoon premium membership of the
Features and Fundamentals of C Language for Beginners
C language variables
CProgrammingTutorial
2. introduction of a c program
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
C Programming and Data structure C Programming and Data structures
cs3362 c programming and data structures
Interview Questions For C Language .pptx
Introduction%20C.pptx
unit 1 cpds.pptx
PSPC--UNIT-2.pdf
Interview Questions For C Language

Recently uploaded (20)

PDF
Insiders guide to clinical Medicine.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
GDM (1) (1).pptx small presentation for students
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Pharma ospi slides which help in ospi learning
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Cell Types and Its function , kingdom of life
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Classroom Observation Tools for Teachers
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Institutional Correction lecture only . . .
PDF
Supply Chain Operations Speaking Notes -ICLT Program
Insiders guide to clinical Medicine.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Structure & Organelles in detailed.
GDM (1) (1).pptx small presentation for students
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Computing-Curriculum for Schools in Ghana
VCE English Exam - Section C Student Revision Booklet
Pharma ospi slides which help in ospi learning
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Basic Mud Logging Guide for educational purpose
Cell Types and Its function , kingdom of life
Module 4: Burden of Disease Tutorial Slides S2 2025
Classroom Observation Tools for Teachers
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Anesthesia in Laparoscopic Surgery in India
Institutional Correction lecture only . . .
Supply Chain Operations Speaking Notes -ICLT Program

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