Recommended
PPTX
unit 1 power point c and data structures
PPTX
cs3362 c programming and data structures
PPTX
Fundamentals_of_C_Language_Lecture_4.pptx
PPTX
C Programming and Data structure C Programming and Data structures
PPTX
Introduction to Programming c language.pptx
PDF
Introduction to C Programming -Lecture 4
DOCX
Programming Fundamentals lecture 4
PPTX
PDF
INTRO_C_LECTURE 2.pdf for computer programming
PDF
UNIT1 PPS of C language for first year first semester
PPTX
programming for problem solving in C and C++.pptx
PPTX
Fundamentals of Programming Constructs.pptx
PPTX
Introduction to C programming language. Coding
PPTX
VARIABLES ssssssssssssssssssssssssssssssssss.pptx
PDF
PPT
Escape Sequences and Variables
PDF
Learn c language Important topics ( Easy & Logical, & smart way of learning)
PPTX
PDF
C programming language tutorial for beginers.pdf
PPTX
Computer programming - variables constants operators expressions and statements
PPTX
DOC
Storage classess of C progamming
PPTX
PPTX
PPTX
presentation_data_types_and_operators_1513499834_241350.pptx
PPTX
What is Variables and Header files
PPTX
presentation_c_basics_1589366177_381682.pptx
PPTX
DOCX
Functions and User-Defined Functions in C Programming Language
DOCX
Structures and basic Operations in C Programming Language
More Related Content
PPTX
unit 1 power point c and data structures
PPTX
cs3362 c programming and data structures
PPTX
Fundamentals_of_C_Language_Lecture_4.pptx
PPTX
C Programming and Data structure C Programming and Data structures
PPTX
Introduction to Programming c language.pptx
PDF
Introduction to C Programming -Lecture 4
DOCX
Programming Fundamentals lecture 4
PPTX
Similar to Variable with Example in C Programming Language
PDF
INTRO_C_LECTURE 2.pdf for computer programming
PDF
UNIT1 PPS of C language for first year first semester
PPTX
programming for problem solving in C and C++.pptx
PPTX
Fundamentals of Programming Constructs.pptx
PPTX
Introduction to C programming language. Coding
PPTX
VARIABLES ssssssssssssssssssssssssssssssssss.pptx
PDF
PPT
Escape Sequences and Variables
PDF
Learn c language Important topics ( Easy & Logical, & smart way of learning)
PPTX
PDF
C programming language tutorial for beginers.pdf
PPTX
Computer programming - variables constants operators expressions and statements
PPTX
DOC
Storage classess of C progamming
PPTX
PPTX
PPTX
presentation_data_types_and_operators_1513499834_241350.pptx
PPTX
What is Variables and Header files
PPTX
presentation_c_basics_1589366177_381682.pptx
PPTX
More from vgowthami9
DOCX
Functions and User-Defined Functions in C Programming Language
DOCX
Structures and basic Operations in C Programming Language
DOCX
Formatted and Unformatted Input_Output in C
DOCX
Decision Making in C Programming Language
DOCX
Introduction to Data Communication and Networks.docx
DOCX
Data and Signal in data communication and networks.docx
DOCX
IPV4 Protocol in data communication and networks.docx
DOCX
Introduction to XHTML / HTML 4.0 .docx
DOCX
Excel for Data Analytics - Basic Excel Formulas.docx
DOCX
Advanced Tools for Data Analytics - Power Query.docx
DOCX
Introduction to Hyper Text Markup Language.docx
DOCX
Data Cleaning and Preparation - Text Functions.docx
DOCX
Random Access Protocols in data communication and networks.docx
DOCX
Hyper Text Markup Language Tags Categories.docx
DOCX
Cascading Styles Sheets Overview .docx
DOCX
Concept of Data Mining Architecture.docx
DOCX
Concept of Classification in Data Mining.docx
DOCX
Software Reliability and Reusability.docx
DOCX
Concept of Data Warehouse Architecture.docx
DOCX
Verification and Validation in Software Engineering.docx
Recently uploaded
DOCX
TOXICITY AND ITS MANAGEMENT 6th sem unit 5, PHARMACOLOGY-III B. PHARMACY
PPTX
What is the Post load hook in Odoo 18
PPTX
Rectal Surgery in Senior Citiizens .pptx
PDF
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
PDF
Orchard Floor Managment.pdf Orchard Floor Management
PPTX
Pain. definition, causes, factor influencing pain & pain assessment.pptx
DOCX
Mobile applications Devlopment ReTest year 2025-2026
PDF
Types of Vegetable Gardens, College of Agriculture Balaghat.pdf
PPTX
Details of Muscular-and-Nervous-Tissues.pptx
PDF
The Pity of War: Form, Fragment, and the Artificial Echo | Understanding War ...
PPTX
10-12-2025 Francois Staring How can Researchers and Initial Teacher Educators...
PDF
The Drift Principle: When Information Accelerates Faster Than Minds Can Compress
PDF
The Tale of Melon City poem ppt by Sahasra
PPTX
15 December 2025 Education for human flourishing Michael Stevenson .pptx
PDF
State: Meaning, Origin, Sovereignty & Forms of Government – A Comprehensive O...
PPTX
How to Manage Reception Report in Odoo 18 Inventory
PPTX
York "Collaboration for Research Support at U-M Library"
PPTX
TAMIS & TEMS - HOW, WHY and THE STEPS IN PROCTOLOGY
PPTX
Unit I — Introduction to Anatomical Terms and Organization of the Human Body
PPTX
Details of Epithelial and Connective Tissue.pptx
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