SlideShare a Scribd company logo
Overview of “C” 
By Abhinav and Aayush 1
History Of C Language 
• The origin of C language dates back to 1972. 
• Dennis M. Ritchie is the man who owns the 
credit of creating the C language. 
• Although created in 1972, it was standardized 
in 1989 by ANSI(American National Standard 
Institute). It came to be known as ANSI C. 
• Some of them have even provided an 
integrated development environment, more 
commonly known as IDE. 
By Abhinav and Aayush 2
Structure of a C program 
Documention 
File include section 
Symbolic Constant Definition 
Global Declaration 
Main() 
{ 
Declaration 
Executable Statements 
} 
Function 1 
{ 
Declaration 
Executable Statement 
} 
Function N 
Optional Section used for Decoumention and global 
declarations 
Compulsory Section for all Executable C program 
Optional Section used to write user defined functions 
By Abhinav and Aayush 3
Character set of C 
• Letters(a To z and A To Z) 
• Digits (0 ,1,2,3,4,5,6,7,8,9) 
• White spaces(Blank space, Form feed, 
Horizontal tab, New line, vertical tab) 
• Special Characters( & , ‘ * @  {} [] ^ : $ = ! / > 
# < - () % . + ? “ ; _ |) 
By Abhinav and Aayush 4
#include<stdio.h> (Keyword) 
main() 
{ 
int i_tot_cost, i_qty=12,i_cost=50; 
clrscr(); 
i_tot_cost=i_qty*i_cost; 
Printf(“Cost of %d items is %d”,i_qrt,i_cost); 
return; 
} 
(Constant) 
(Identifier) 
(Operator) 
(String) 
(Special Character) 
By Abhinav and Aayush 5
Keyword 
Auto double int stuct 
Break else long switch 
Case enum register typedef 
Char extern return union 
Const float short unsigned 
Continue for signed void 
Default goto sizeof volatile 
Do if static while 
By Abhinav and Aayush 6
Constant 
Numeric 
Constant 
Character 
Symbolic 
Black 
Slash 
(1) Integer 
(2) Real 
(1) Single Character 
(2) String 
7 
Eg.- 
“n” 
By Abhinav and Aayush
Back Slash Characters 
Back Slash Characters ASCII Value 
0 0 
a 7 
b 8 
t 9 
n 10 
f 12 
* 34 
By Abhinav and Aayush 8
Data Types 
Primitive Non-Primitive 
Int char float 
void pointer 
Array Enum 
Struct 
By Abhinav and Aayush 9
Input and Output Functions 
Formatted Function 
Function Used for 
Scanf Input 
Printf Output 
unformatted Function 
Function Used for 
Getchar() input 
Gets() input 
Getc() input 
Putchar() output 
Putc() output 
Puts() output 
By Abhinav and Aayush 10
Input 
• scanf(“string”,&address_list_of_identifiers); 
• identifier name=getchar(); 
• identifier name=getc(stdin); 
• gets(identifier name); 
By Abhinav and Aayush 11
Output 
Printf(“message string”); 
Putchar(“a”); 
putc(“a”); 
puts(“identifier name”); 
By Abhinav and Aayush 12
Operator 
Arithmetic 
Assignment 
Relation 
Increment/Decrement 
Conditional 
Logical 
Bitwise 
Special 
By Abhinav and Aayush 13
Arithmetic Operators 
+ Addition operator 
- Subtraction operator 
• Multiplication operator 
/ Division operator 
% Module operator 
By Abhinav and Aayush 14
Assignment Operators 
Identifier A0p=constant value; 
Ex- 
Area=(base * height)/2; 
Roll_no=14; 
By Abhinav and Aayush 15
Relational Operators 
== Equal to 
!= Not Equal to 
> Greater than 
< Less than 
>= Greater than Equal to 
<= Less than Equal to 
By Abhinav and Aayush 16
Increment and Decrement Operators 
++identifier or identifier++ 
--identifier or identifier— 
By Abhinav and Aayush 17
Condition 
(condition) ? (true statement) : (false statement) 
Ex-i_ 
minimum=(i_num1<=i_num2)?(i_num1):(i_num2); 
Printf(“the min value of the two is %d”,i_minimum); 
By Abhinav and Aayush 18
Logical Operators 
&& Logical AND 
|| Logical Or 
! Logical NOT 
By Abhinav and Aayush 19
Bitwise Operators 
& Bitwise AND 
| Bitwise OR 
~ Bitwise NOT 
^ Bitwise Exclusive OR 
By Abhinav and Aayush 20
Special Operators 
• Category Symbol 
• Sizeof sizeof() 
• Pointer & , * 
• Member Selection . , -> 
By Abhinav and Aayush 21
If Statement 
if(test condition) 
Action statement; 
If-else Statement 
if(test condition) 
{ 
True action statement; 
} 
else 
{ 
False action statement; 
} 
By Abhinav and Aayush 22
Switch 
Switch(expression) 
{ 
Case v1: 
Action block 1; 
break; 
- 
- 
Case value N : 
Action block N; 
Break; 
Default : 
Action block; 
Break; 
} By Abhinav and Aayush 23
For loop 
For(initiailization; condition;increment) 
{ 
Action block; 
} 
while loop 
While(test condition) 
Action block; 
By Abhinav and Aayush 24
Do while 
Do 
{ 
Action block; 
} 
While(test condition); 
By Abhinav and Aayush 25
Goto 
goto label; 
By Abhinav and Aayush 26
Types of function 
• Function with no parameter and no return 
value 
• Function with no parameter and return value 
• Function with parameter and return value 
• Function with parameter and no return value 
By Abhinav and Aayush 27
Steps of function 
• Function declaration( above main function) 
• Function call(in the main function) 
• Function definition( below main function) 
By Abhinav and Aayush 28
Call by value 
Function call time passing value it is called “call 
by value”. 
C=add(a,b) 
Call by reference 
Function call time passing address it is called 
“call by reference”. 
C=add(&a,&b) 
By Abhinav and Aayush 29
Types of array 
• Single-dimensional array 
• Two-dimensional array 
• Multi-dimensional array 
By Abhinav and Aayush 30
Single-dimensional array 
If an array has only one dimensional, it is call 
Single-dimensional array 
Syntax- 
Type arrayname[size]; 
Ex- 
Int a[5]; 
By Abhinav and Aayush 31
Two-dimensional array 
If an array has only two dimensional, it is call 
two-dimensional array 
Syntax- 
Type arrayname[size] [size] [size]; 
Ex- 
Int [5][5]; 
By Abhinav and Aayush 32
Multi-dimensional array 
If an array has two or more dimensional it is call 
multi-dimensional array 
Syntax- 
Type arrayname[size] [size] [size]; 
Exp- 
Int [5][5][2]; 
By Abhinav and Aayush 33
String 
One or more character are called string. 
Syntax 
Data type string name[size]; 
Ex- 
Char name[10]; 
By Abhinav and Aayush 34
Type of string 
• Strcat()-join two string 
• Strcpy()-one string copy to another 
• Strcmp()-comparison two strings. 
• Strlen()-length 
By Abhinav and Aayush 35
Strcat() 
S1=abc S2=def 
S3=strcat(S1,S2); 
abcdef 
Strcpy() 
S1=abc S2=def 
S3=strcpy(S1,S2); 
def 
By Abhinav and Aayush 36
Strcmp() 
S1=abc S2=xaz 
S3=strcmp(S1,S2) 
a 
Strlen() 
S1=tbs 
n=strlen(S1); 
n=3 
By Abhinav and Aayush 37
Structure 
• Structure is user define data type it is used to 
collection of deffertent data item in single location. 
Syntax- 
Struct structure name 
{ 
Data item 1 
-- 
-- 
} 
By Abhinav and Aayush 38
Union 
Union are same to Structure. One different 
between structure and union. Structure 
member’s memory allocate every member but 
union have only one member’s memory 
allocate. 
By Abhinav and Aayush 39
By Abhinav and Aayush 40
Thank You 
By Abhinav and Aayush 41

More Related Content

What's hot

C ppt
C pptC ppt
C ppt
jasmeen kr
 
Application of Stacks
Application of StacksApplication of Stacks
Application of Stacks
Ain-ul-Moiz Khawaja
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
Chukka Nikhil Chakravarthy
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
sanya6900
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
vishaljot_kaur
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Brendan Eich
 
Report on c
Report on cReport on c
Report on c
jasmeen kr
 
Web futures
Web futuresWeb futures
Web futures
Brendan Eich
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
Hemantha Kulathilake
 
Unit 4. Operators and Expression
Unit 4. Operators and Expression  Unit 4. Operators and Expression
Unit 4. Operators and Expression
Ashim Lamichhane
 
Functional programming-advantages
Functional programming-advantagesFunctional programming-advantages
Functional programming-advantages
Sergei Winitzki
 
C operators
C operators C operators
C operators
AbiramiT9
 
Functional Programming Advanced
Functional Programming AdvancedFunctional Programming Advanced
Functional Programming Advanced
OleksiyTereshchenko
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
Saranya saran
 
Manipulators
ManipulatorsManipulators
Manipulators
Kamal Acharya
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
Praveen M Jigajinni
 
Ankita sharma focp
Ankita sharma focpAnkita sharma focp
Ankita sharma focp
AnkitaSharma463389
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
JeeSa Sultana
 
Functions & Procedures [7]
Functions & Procedures [7]Functions & Procedures [7]
Functions & Procedures [7]
ecko_disasterz
 
Operators in c language
Operators in c languageOperators in c language
Operators in c language
Amit Singh
 

What's hot (20)

C ppt
C pptC ppt
C ppt
 
Application of Stacks
Application of StacksApplication of Stacks
Application of Stacks
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
 
Report on c
Report on cReport on c
Report on c
 
Web futures
Web futuresWeb futures
Web futures
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
 
Unit 4. Operators and Expression
Unit 4. Operators and Expression  Unit 4. Operators and Expression
Unit 4. Operators and Expression
 
Functional programming-advantages
Functional programming-advantagesFunctional programming-advantages
Functional programming-advantages
 
C operators
C operators C operators
C operators
 
Functional Programming Advanced
Functional Programming AdvancedFunctional Programming Advanced
Functional Programming Advanced
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
 
Manipulators
ManipulatorsManipulators
Manipulators
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 
Ankita sharma focp
Ankita sharma focpAnkita sharma focp
Ankita sharma focp
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
 
Functions & Procedures [7]
Functions & Procedures [7]Functions & Procedures [7]
Functions & Procedures [7]
 
Operators in c language
Operators in c languageOperators in c language
Operators in c language
 

Viewers also liked

Studio-C Tech Catalog
Studio-C Tech CatalogStudio-C Tech Catalog
Studio-C Tech Catalog
Paul R. Wagner
 
Introduction to pointers and memory management in C
Introduction to pointers and memory management in CIntroduction to pointers and memory management in C
Introduction to pointers and memory management in C
Uri Dekel
 
C pointer
C pointerC pointer
Introduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical ApproachIntroduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical Approach
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
C language ppt
C language pptC language ppt
C language ppt
Ğäùråv Júñêjå
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
Abhishek Dwivedi
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
avikdhupar
 

Viewers also liked (8)

Studio-C Tech Catalog
Studio-C Tech CatalogStudio-C Tech Catalog
Studio-C Tech Catalog
 
Introduction to pointers and memory management in C
Introduction to pointers and memory management in CIntroduction to pointers and memory management in C
Introduction to pointers and memory management in C
 
C pointer
C pointerC pointer
C pointer
 
Introduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical ApproachIntroduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical Approach
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
C language ppt
C language pptC language ppt
C language ppt
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 

Similar to Overview of c (2)

Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and Functions
DhivyaSubramaniyam
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
Wingston
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
Ralph Weber
 
Operators
OperatorsOperators
Ch 4
Ch 4Ch 4
Ch 4
AMIT JAIN
 
unit 3 ppt.pptx
unit 3 ppt.pptxunit 3 ppt.pptx
unit 3 ppt.pptx
thenmozhip8
 
U3.pptx
U3.pptxU3.pptx
Python Basics
Python BasicsPython Basics
Python Basics
tusharpanda88
 
presentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptxpresentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptx
KrishanPalSingh39
 
C tutorial
C tutorialC tutorial
C tutorial
Anurag Sukhija
 
Unit 5 Foc
Unit 5 FocUnit 5 Foc
Unit 5 Foc
JAYA
 
Python programming workshop
Python programming workshopPython programming workshop
Python programming workshop
BAINIDA
 
Lec-1c.pdf
Lec-1c.pdfLec-1c.pdf
Lec-1c.pdf
Ritikchaudhary72
 
Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16
Indira Gnadhi National Open University (IGNOU)
 
201801 CSE240 Lecture 07
201801 CSE240 Lecture 07201801 CSE240 Lecture 07
201801 CSE240 Lecture 07
Javier Gonzalez-Sanchez
 
additional.pptx
additional.pptxadditional.pptx
additional.pptx
Yuvraj994432
 
CLISP Lab Manual - Dr.J.VijiPriya
CLISP Lab Manual - Dr.J.VijiPriyaCLISP Lab Manual - Dr.J.VijiPriya
CLISP Lab Manual - Dr.J.VijiPriya
VijiPriya Jeyamani
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing Tutorial
Mahira Banu
 
Python programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsPython programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operations
Megha V
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Chris Adamson
 

Similar to Overview of c (2) (20)

Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and Functions
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
 
Operators
OperatorsOperators
Operators
 
Ch 4
Ch 4Ch 4
Ch 4
 
unit 3 ppt.pptx
unit 3 ppt.pptxunit 3 ppt.pptx
unit 3 ppt.pptx
 
U3.pptx
U3.pptxU3.pptx
U3.pptx
 
Python Basics
Python BasicsPython Basics
Python Basics
 
presentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptxpresentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptx
 
C tutorial
C tutorialC tutorial
C tutorial
 
Unit 5 Foc
Unit 5 FocUnit 5 Foc
Unit 5 Foc
 
Python programming workshop
Python programming workshopPython programming workshop
Python programming workshop
 
Lec-1c.pdf
Lec-1c.pdfLec-1c.pdf
Lec-1c.pdf
 
Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16
 
201801 CSE240 Lecture 07
201801 CSE240 Lecture 07201801 CSE240 Lecture 07
201801 CSE240 Lecture 07
 
additional.pptx
additional.pptxadditional.pptx
additional.pptx
 
CLISP Lab Manual - Dr.J.VijiPriya
CLISP Lab Manual - Dr.J.VijiPriyaCLISP Lab Manual - Dr.J.VijiPriya
CLISP Lab Manual - Dr.J.VijiPriya
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing Tutorial
 
Python programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsPython programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operations
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
 

Overview of c (2)

  • 1. Overview of “C” By Abhinav and Aayush 1
  • 2. History Of C Language • The origin of C language dates back to 1972. • Dennis M. Ritchie is the man who owns the credit of creating the C language. • Although created in 1972, it was standardized in 1989 by ANSI(American National Standard Institute). It came to be known as ANSI C. • Some of them have even provided an integrated development environment, more commonly known as IDE. By Abhinav and Aayush 2
  • 3. Structure of a C program Documention File include section Symbolic Constant Definition Global Declaration Main() { Declaration Executable Statements } Function 1 { Declaration Executable Statement } Function N Optional Section used for Decoumention and global declarations Compulsory Section for all Executable C program Optional Section used to write user defined functions By Abhinav and Aayush 3
  • 4. Character set of C • Letters(a To z and A To Z) • Digits (0 ,1,2,3,4,5,6,7,8,9) • White spaces(Blank space, Form feed, Horizontal tab, New line, vertical tab) • Special Characters( & , ‘ * @ {} [] ^ : $ = ! / > # < - () % . + ? “ ; _ |) By Abhinav and Aayush 4
  • 5. #include<stdio.h> (Keyword) main() { int i_tot_cost, i_qty=12,i_cost=50; clrscr(); i_tot_cost=i_qty*i_cost; Printf(“Cost of %d items is %d”,i_qrt,i_cost); return; } (Constant) (Identifier) (Operator) (String) (Special Character) By Abhinav and Aayush 5
  • 6. Keyword Auto double int stuct Break else long switch Case enum register typedef Char extern return union Const float short unsigned Continue for signed void Default goto sizeof volatile Do if static while By Abhinav and Aayush 6
  • 7. Constant Numeric Constant Character Symbolic Black Slash (1) Integer (2) Real (1) Single Character (2) String 7 Eg.- “n” By Abhinav and Aayush
  • 8. Back Slash Characters Back Slash Characters ASCII Value 0 0 a 7 b 8 t 9 n 10 f 12 * 34 By Abhinav and Aayush 8
  • 9. Data Types Primitive Non-Primitive Int char float void pointer Array Enum Struct By Abhinav and Aayush 9
  • 10. Input and Output Functions Formatted Function Function Used for Scanf Input Printf Output unformatted Function Function Used for Getchar() input Gets() input Getc() input Putchar() output Putc() output Puts() output By Abhinav and Aayush 10
  • 11. Input • scanf(“string”,&address_list_of_identifiers); • identifier name=getchar(); • identifier name=getc(stdin); • gets(identifier name); By Abhinav and Aayush 11
  • 12. Output Printf(“message string”); Putchar(“a”); putc(“a”); puts(“identifier name”); By Abhinav and Aayush 12
  • 13. Operator Arithmetic Assignment Relation Increment/Decrement Conditional Logical Bitwise Special By Abhinav and Aayush 13
  • 14. Arithmetic Operators + Addition operator - Subtraction operator • Multiplication operator / Division operator % Module operator By Abhinav and Aayush 14
  • 15. Assignment Operators Identifier A0p=constant value; Ex- Area=(base * height)/2; Roll_no=14; By Abhinav and Aayush 15
  • 16. Relational Operators == Equal to != Not Equal to > Greater than < Less than >= Greater than Equal to <= Less than Equal to By Abhinav and Aayush 16
  • 17. Increment and Decrement Operators ++identifier or identifier++ --identifier or identifier— By Abhinav and Aayush 17
  • 18. Condition (condition) ? (true statement) : (false statement) Ex-i_ minimum=(i_num1<=i_num2)?(i_num1):(i_num2); Printf(“the min value of the two is %d”,i_minimum); By Abhinav and Aayush 18
  • 19. Logical Operators && Logical AND || Logical Or ! Logical NOT By Abhinav and Aayush 19
  • 20. Bitwise Operators & Bitwise AND | Bitwise OR ~ Bitwise NOT ^ Bitwise Exclusive OR By Abhinav and Aayush 20
  • 21. Special Operators • Category Symbol • Sizeof sizeof() • Pointer & , * • Member Selection . , -> By Abhinav and Aayush 21
  • 22. If Statement if(test condition) Action statement; If-else Statement if(test condition) { True action statement; } else { False action statement; } By Abhinav and Aayush 22
  • 23. Switch Switch(expression) { Case v1: Action block 1; break; - - Case value N : Action block N; Break; Default : Action block; Break; } By Abhinav and Aayush 23
  • 24. For loop For(initiailization; condition;increment) { Action block; } while loop While(test condition) Action block; By Abhinav and Aayush 24
  • 25. Do while Do { Action block; } While(test condition); By Abhinav and Aayush 25
  • 26. Goto goto label; By Abhinav and Aayush 26
  • 27. Types of function • Function with no parameter and no return value • Function with no parameter and return value • Function with parameter and return value • Function with parameter and no return value By Abhinav and Aayush 27
  • 28. Steps of function • Function declaration( above main function) • Function call(in the main function) • Function definition( below main function) By Abhinav and Aayush 28
  • 29. Call by value Function call time passing value it is called “call by value”. C=add(a,b) Call by reference Function call time passing address it is called “call by reference”. C=add(&a,&b) By Abhinav and Aayush 29
  • 30. Types of array • Single-dimensional array • Two-dimensional array • Multi-dimensional array By Abhinav and Aayush 30
  • 31. Single-dimensional array If an array has only one dimensional, it is call Single-dimensional array Syntax- Type arrayname[size]; Ex- Int a[5]; By Abhinav and Aayush 31
  • 32. Two-dimensional array If an array has only two dimensional, it is call two-dimensional array Syntax- Type arrayname[size] [size] [size]; Ex- Int [5][5]; By Abhinav and Aayush 32
  • 33. Multi-dimensional array If an array has two or more dimensional it is call multi-dimensional array Syntax- Type arrayname[size] [size] [size]; Exp- Int [5][5][2]; By Abhinav and Aayush 33
  • 34. String One or more character are called string. Syntax Data type string name[size]; Ex- Char name[10]; By Abhinav and Aayush 34
  • 35. Type of string • Strcat()-join two string • Strcpy()-one string copy to another • Strcmp()-comparison two strings. • Strlen()-length By Abhinav and Aayush 35
  • 36. Strcat() S1=abc S2=def S3=strcat(S1,S2); abcdef Strcpy() S1=abc S2=def S3=strcpy(S1,S2); def By Abhinav and Aayush 36
  • 37. Strcmp() S1=abc S2=xaz S3=strcmp(S1,S2) a Strlen() S1=tbs n=strlen(S1); n=3 By Abhinav and Aayush 37
  • 38. Structure • Structure is user define data type it is used to collection of deffertent data item in single location. Syntax- Struct structure name { Data item 1 -- -- } By Abhinav and Aayush 38
  • 39. Union Union are same to Structure. One different between structure and union. Structure member’s memory allocate every member but union have only one member’s memory allocate. By Abhinav and Aayush 39
  • 40. By Abhinav and Aayush 40
  • 41. Thank You By Abhinav and Aayush 41