SlideShare a Scribd company logo
1 of 14
Data structure using C
Dr. Amit J. Chinchawade
PhD ( Electronics & Communication)
Department of Electronics & Computer,
Sharad Institute of Technology College of Engineering , Yadrav
C is a procedural programming language known for its simplicity and
flexibility. Its basic structure consists of a set of elements and syntax rules
that we need to follow when writing C programs.
1. Comments:
Comments are used to provide information about the code but are ignored
by the compiler. In C, comments can be single-line comments (starting
with `//`) or multi-line comments (enclosed within `/*` and `*/`).
// This is a single-line comment
/*
This is a
multi-line comment
*/
2. **Preprocessor Directives**:
Preprocessor directives start with a `#` symbol and are used to include
header files, define macros, and perform other preprocessing tasks.
Common directives include `#include` for including header files and
`#define` for defining macros.
#include <stdio.h>
#define PI 3.14159
3. **Main Function**:
Every C program must have a `main` function. Execution of the program
begins with the `main` function.
int main() {
// Your code here
return 0;
}
4. **Data Types**:
C supports various data types such as `int`, `float`, `char`, etc. You use
these to declare variables.
int age;
float price;
char grade;
5. **Variable Declarations**:
Variables are declared before they are used. You specify the data type and
the variable name.
int x, y;
6. **Statements and Expressions**:
C programs consist of statements and expressions that perform actions or
calculations. Statements typically end with a semicolon `;`.
x = 10;
y = x + 5;
7. **Functions**:
You can define your own functions, in addition to `main`, to break the
program into smaller, manageable parts.
int add(int a, int b) {
return a + b;
}
8. **Control Structures**:
C provides control structures such as `if`, `else`, `while`, `for`, etc., to
control the flow of your program.
if (x > 0) {
printf("x is positiven");
} else {
printf("x is non-positiven");
}
while (y < 100) {
// Loop body
}
for (int i = 0; i < 5; i++) {
// Loop body
}
9. **I/O Functions**:
C provides functions like `printf` and `scanf` for input and output
operations.
printf("Enter your age: ");
scanf("%d", &age);
10. **Libraries**:
You can use functions from standard libraries by including the appropriate
header files and linking with the necessary libraries.
#include <stdio.h> // Standard I/O library
#include <math.h> // Math library
11. **Return Statement**:
The `main` function typically ends with a `return` statement, indicating the
program's exit status (0 typically means successful execution).
return 0;

More Related Content

Similar to Data Structure Using C.pptx

C language introduction geeksfor geeks
C language introduction   geeksfor geeksC language introduction   geeksfor geeks
C language introduction geeksfor geeks
AashutoshChhedavi
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
Rajeshkumar Reddy
 
Principles of object oriented programing
Principles of object oriented programingPrinciples of object oriented programing
Principles of object oriented programing
Ahammed Alamin
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
Rajb54
 

Similar to Data Structure Using C.pptx (20)

C language introduction geeksfor geeks
C language introduction   geeksfor geeksC language introduction   geeksfor geeks
C language introduction geeksfor geeks
 
C programming
C programmingC programming
C programming
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
 
(Lect. 2 & 3) Introduction to C.ppt
(Lect. 2 & 3) Introduction to C.ppt(Lect. 2 & 3) Introduction to C.ppt
(Lect. 2 & 3) Introduction to C.ppt
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
Programming in c
Programming in cProgramming in c
Programming in c
 
C tutorials
C tutorialsC tutorials
C tutorials
 
C programming course material
C programming course materialC programming course material
C programming course material
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
 
Principles of object oriented programing
Principles of object oriented programingPrinciples of object oriented programing
Principles of object oriented programing
 
Programming in C
Programming in CProgramming in C
Programming in C
 
C language
C languageC language
C language
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
The smartpath information systems c pro
The smartpath information systems c proThe smartpath information systems c pro
The smartpath information systems c pro
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).ppt
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 
Learning the C Language
Learning the C LanguageLearning the C Language
Learning the C Language
 

Recently uploaded

一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理
cyebo
 
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
pyhepag
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
pyhepag
 
Exploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxExploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptx
DilipVasan
 
Fuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertaintyFuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertainty
RafigAliyev2
 
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotecAbortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
pyhepag
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
cyebo
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
pyhepag
 

Recently uploaded (20)

一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理一比一原版纽卡斯尔大学毕业证成绩单如何办理
一比一原版纽卡斯尔大学毕业证成绩单如何办理
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
 
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
 
Slip-and-fall Injuries: Top Workers' Comp Claims
Slip-and-fall Injuries: Top Workers' Comp ClaimsSlip-and-fall Injuries: Top Workers' Comp Claims
Slip-and-fall Injuries: Top Workers' Comp Claims
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?
 
Exploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptxExploratory Data Analysis - Dilip S.pptx
Exploratory Data Analysis - Dilip S.pptx
 
Fuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertaintyFuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertainty
 
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotecAbortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
 
2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting
 
Easy and simple project file on mp online
Easy and simple project file on mp onlineEasy and simple project file on mp online
Easy and simple project file on mp online
 
2024 Q1 Tableau User Group Leader Quarterly Call
2024 Q1 Tableau User Group Leader Quarterly Call2024 Q1 Tableau User Group Leader Quarterly Call
2024 Q1 Tableau User Group Leader Quarterly Call
 
MALL CUSTOMER SEGMENTATION USING K-MEANS CLUSTERING.pptx
MALL CUSTOMER SEGMENTATION USING K-MEANS CLUSTERING.pptxMALL CUSTOMER SEGMENTATION USING K-MEANS CLUSTERING.pptx
MALL CUSTOMER SEGMENTATION USING K-MEANS CLUSTERING.pptx
 
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPsWebinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
 
How I opened a fake bank account and didn't go to prison
How I opened a fake bank account and didn't go to prisonHow I opened a fake bank account and didn't go to prison
How I opened a fake bank account and didn't go to prison
 
Machine Learning for Accident Severity Prediction
Machine Learning for Accident Severity PredictionMachine Learning for Accident Severity Prediction
Machine Learning for Accident Severity Prediction
 
how can i exchange pi coins for others currency like Bitcoin
how can i exchange pi coins for others currency like Bitcoinhow can i exchange pi coins for others currency like Bitcoin
how can i exchange pi coins for others currency like Bitcoin
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
 

Data Structure Using C.pptx

  • 1. Data structure using C Dr. Amit J. Chinchawade PhD ( Electronics & Communication) Department of Electronics & Computer, Sharad Institute of Technology College of Engineering , Yadrav
  • 2. C is a procedural programming language known for its simplicity and flexibility. Its basic structure consists of a set of elements and syntax rules that we need to follow when writing C programs.
  • 3. 1. Comments: Comments are used to provide information about the code but are ignored by the compiler. In C, comments can be single-line comments (starting with `//`) or multi-line comments (enclosed within `/*` and `*/`). // This is a single-line comment /* This is a multi-line comment */
  • 4. 2. **Preprocessor Directives**: Preprocessor directives start with a `#` symbol and are used to include header files, define macros, and perform other preprocessing tasks. Common directives include `#include` for including header files and `#define` for defining macros. #include <stdio.h> #define PI 3.14159
  • 5. 3. **Main Function**: Every C program must have a `main` function. Execution of the program begins with the `main` function. int main() { // Your code here return 0; }
  • 6. 4. **Data Types**: C supports various data types such as `int`, `float`, `char`, etc. You use these to declare variables. int age; float price; char grade;
  • 7. 5. **Variable Declarations**: Variables are declared before they are used. You specify the data type and the variable name. int x, y;
  • 8. 6. **Statements and Expressions**: C programs consist of statements and expressions that perform actions or calculations. Statements typically end with a semicolon `;`. x = 10; y = x + 5;
  • 9. 7. **Functions**: You can define your own functions, in addition to `main`, to break the program into smaller, manageable parts. int add(int a, int b) { return a + b; }
  • 10. 8. **Control Structures**: C provides control structures such as `if`, `else`, `while`, `for`, etc., to control the flow of your program. if (x > 0) { printf("x is positiven"); } else { printf("x is non-positiven"); }
  • 11. while (y < 100) { // Loop body } for (int i = 0; i < 5; i++) { // Loop body }
  • 12. 9. **I/O Functions**: C provides functions like `printf` and `scanf` for input and output operations. printf("Enter your age: "); scanf("%d", &age);
  • 13. 10. **Libraries**: You can use functions from standard libraries by including the appropriate header files and linking with the necessary libraries. #include <stdio.h> // Standard I/O library #include <math.h> // Math library
  • 14. 11. **Return Statement**: The `main` function typically ends with a `return` statement, indicating the program's exit status (0 typically means successful execution). return 0;