Recommended
PPTX
unit 1 power point c and data structures
PPTX
cs3362 c programming and data structures
PPTX
C Programming and Data structure C Programming and Data structures
PPTX
Fundamentals_of_C_Language_Lecture_4.pptx
PPTX
Introduction to Programming c language.pptx
PDF
Introduction to C Programming -Lecture 4
PPTX
DOCX
Programming Fundamentals lecture 4
PPTX
programming for problem solving in C and C++.pptx
PDF
INTRO_C_LECTURE 2.pdf for computer programming
PPTX
Fundamentals of Programming Constructs.pptx
PDF
UNIT1 PPS of C language for first year first semester
PPTX
VARIABLES ssssssssssssssssssssssssssssssssss.pptx
PPTX
Introduction to C programming language. Coding
PDF
Learn c language Important topics ( Easy & Logical, & smart way of learning)
PPTX
Computer programming - variables constants operators expressions and statements
PDF
PPT
Escape Sequences and Variables
PDF
C programming language tutorial for beginers.pdf
PPTX
PPTX
PPTX
DOC
Storage classess of C progamming
PPTX
PPTX
presentation_data_types_and_operators_1513499834_241350.pptx
PPTX
presentation_c_basics_1589366177_381682.pptx
PPTX
What is Variables and Header files
PPTX
DOCX
Functions and User-Defined Functions in C Programming Language
DOCX
Formatted and Unformatted Input_Output in C
More Related Content
PPTX
unit 1 power point c and data structures
PPTX
cs3362 c programming and data structures
PPTX
C Programming and Data structure C Programming and Data structures
PPTX
Fundamentals_of_C_Language_Lecture_4.pptx
PPTX
Introduction to Programming c language.pptx
PDF
Introduction to C Programming -Lecture 4
PPTX
DOCX
Programming Fundamentals lecture 4
Similar to Variable with Example in C Programming Language
PPTX
programming for problem solving in C and C++.pptx
PDF
INTRO_C_LECTURE 2.pdf for computer programming
PPTX
Fundamentals of Programming Constructs.pptx
PDF
UNIT1 PPS of C language for first year first semester
PPTX
VARIABLES ssssssssssssssssssssssssssssssssss.pptx
PPTX
Introduction to C programming language. Coding
PDF
Learn c language Important topics ( Easy & Logical, & smart way of learning)
PPTX
Computer programming - variables constants operators expressions and statements
PDF
PPT
Escape Sequences and Variables
PDF
C programming language tutorial for beginers.pdf
PPTX
PPTX
PPTX
DOC
Storage classess of C progamming
PPTX
PPTX
presentation_data_types_and_operators_1513499834_241350.pptx
PPTX
presentation_c_basics_1589366177_381682.pptx
PPTX
What is Variables and Header files
PPTX
More from vgowthami9
DOCX
Functions and User-Defined Functions in C Programming Language
DOCX
Formatted and Unformatted Input_Output in C
DOCX
Structures and basic Operations in C Programming Language
DOCX
Decision Making in C Programming Language
DOCX
Concept of Classification in Data Mining.docx
DOCX
Concept of Data Mining Architecture.docx
DOCX
Advanced Tools for Data Analytics - Power Query.docx
DOCX
Introduction to XHTML / HTML 4.0 .docx
DOCX
Concept of Data Warehouse Architecture.docx
DOCX
Introduction to Data Communication and Networks.docx
DOCX
Excel for Data Analytics - Basic Excel Formulas.docx
DOCX
IPV4 Protocol in data communication and networks.docx
DOCX
Cascading Styles Sheets Overview .docx
DOCX
Random Access Protocols in data communication and networks.docx
DOCX
Data and Signal in data communication and networks.docx
DOCX
Hyper Text Markup Language Tags Categories.docx
DOCX
Software Reliability and Reusability.docx
DOCX
Data Cleaning and Preparation - Text Functions.docx
DOCX
Introduction to Hyper Text Markup Language.docx
DOCX
Verification and Validation in Software Engineering.docx
Recently uploaded
PPTX
SP C PROGRAMMING BASIC CONCEPTS WITH SAMPLE CODE.pptx
PDF
Production Tech of Vegetables_Notes on PGR.pdf
PPTX
Photography Pillar 1 The Subject PowerPoint
PDF
Photoperiod Classification of Vegetable Plants.pdf
PDF
Fundamental of Horticulture _HORTICULTURAL PLANT CLASSIFICATION.pdf
PDF
Introductions Introductions Introductions
PDF
Sample Research Instruments for Initial Survey.pdf
PDF
MEDINIPUR QUIZ PREMIER LEAGUE PRACTICE QUIZ SET
PDF
Approaches and Methods in Political Science -EVOLUTION OF POLITICAL THOUGHT -...
PPTX
How to Enter Opening Stock in Odoo 18 Inventory
PDF
the dynasty history of Chahmanas Early Medieval India
PDF
SHS_Core_CAE_Q3_LE1 FOR THIRD [FINAL].pdf
PDF
Education Research in Ireland: Listening to all voices_Selina McCoy.pdf
PPTX
UNIT 4 – CLINICAL ENZYMOLOGY.pptx.......
PPTX
Add stage button in kanban view in Odoo 19
PPTX
Types_of_Volcanoes_Presentation.pptx Science 8 Matatag
PPTX
COPD (Chronic obstructive pulmonary disease) by ebadi.pptx
PPTX
TEACHING OF POETRY.pptx. The PPT helps and provides guidance on Lesson Planni...
PPTX
14 November 2025 The Impact of Digital Technologies on Students Learning
PPTX
Structure and Functions of Cell (Unit I)
Variable with Example in C Programming Language 1. A variable in C is a named piece of memory which is used to store data and
access it whenever required. It allows us to use the memory without having
to memorize the exact memory address.
To create a variable in C, we have to specify a name and the type of data it is
going to store in the syntax.
data_type name;
For example, int, char, float, double, etc.
int num;
char letter;
float decimal;
C Variable Initialization
Once the variable is declared, we can store useful values in it. The first value
we store is called initial value and the process is called Initialization. It is
done using assignment operator (=).
int num;
num = 3;
It is important to initialize a variable because a C variable only contains
garbage value when it is declared. We can also initialize a variable along
with declaration.
int num = 3;
Accessing Variables
The data stored inside a C variable can be easily accessed by using the
variable's name.
Example:
#include <stdio.h>
int main() {
2. // Create integer variable
int num = 3;
// Access the value stored in
// variable
printf("%d", num);
return 0;
}
Output
3