SlideShare a Scribd company logo
C- PROGRAMMING 
FUNCTION
NOTES
System Define function 
#include<stdio.h> 
#include<conio.h> 
#include<math.h> 
void main() 
{ 
int num; 
float r; 
clrscr(); 
printf(“Enter any non”); 
scanf(“%d”,&num); 
r=sqrt(num); 
printf(“root of %d is %f n”, num,r); 
getch(); 
} 
EXTRA
NOTES
NOTES
User Define Function 
#include<stdio.h> Parameter and no return value 
#include<conio.h> 
void add(int, int); 
void main() 
{ 
int a,b; 
clrscr(); 
printf(“Enter two numbern”); 
scanf(“%d%d”,&a,&b); 
printf(“Value of A =%dn”,a); 
printf(“Value of B =%dn”,b); 
add(a,b); 
getch(); 
} no return 
void add(int x, int y) 
{ with Parameter 
int z; 
z=x+y; 
printf(“Sum of two no = %dn”,z); 
} 
EXTRA
User Define Function 
#include<stdio.h> Parameter and return value 
#include<conio.h> 
int add(int, int); 
void main() 
{ 
int a,b,c; 
clrscr(); 
printf(“Enter two numbern”); 
scanf(“%d%d”,&a,&b); 
printf(“Value of A =%dn”,a); 
printf(“Value of B =%dn”,b); 
c=add(a,b); 
printf(“Sum of two no = %dn”,c); 
getch(); 
} with return 
int add(int x, int y) 
{ with parameter 
int z; 
z=x+y; 
return z; 
} 
EXTRA
User Define Function 
No #include<stdio.h> Parameter and no return value 
#include<conio.h> 
void disp(); 
void main() 
{ 
clrscr(); 
disp(); 
getch(); 
} no return 
void disp() 
{ no parameter 
int a,b,c; 
printf(“Enter two numbern”); 
scanf(“%d%d”,&a,&b); 
printf(“Value of A =%dn”,a); 
printf(“Value of B =%dn”,b); 
c=a+b; 
printf(“Sum of two no = %dn”,c); 
getch(); 
} 
EXTRA
User Define Function 
No Parameter and return value 
#include<stdio.h> 
#include<conio.h> 
int fact(); 
void main() 
{ 
clrscr(); 
printf("Factorial %d",fact()); 
getch(); 
} with return 
int fact() 
{ no parameter 
int n,f=1; 
printf(" Enter any numbern"); 
scanf("%d",&n); 
while(n>=1) 
{ 
f=n*f; 
n--; 
} 
return f; 
} 
EXTRA
User Define Function 
Call by value method 
#include<stdio.h> 
#include<conio.h> 
void disp (int , int); 
void main() 
{ 
int a,b; 
clrscr(); 
printf(“Enter the Value of a & bn”); 
scanf(“%d%d”,&a,&b); 
printf(“Value of a before function %dn”,a); 
printf(“Value of b before function %dn”,b); 
disp(a,b); 
printf(“value of a after function %dn”,a); 
printf(“Value of b after function %dn”,b); 
getch(); 
} 
void disp(int a, int b) 
{ 
a=a+10; 
b=b+10; 
printf(“Value of a inside function %dn”,a); 
printf(“value of b inside function %dn”,b); 
} 
EXTRA
User Define Function 
Call by reference method 
#include<stdio.h> 
#include<conio.h> 
void disp (int &, int&); 
void main() 
{ 
int a,b; 
clrscr(); 
printf(“Enter the Value of a & bn”); 
scanf(“%d%d”,&a,&b); 
printf(“Value of a before function %dn”,a); 
printf(“Value of b before function %dn”,b); 
disp(a,b); 
printf(“value of a after function %dn”,a); 
printf(“Value of b after function %dn”,b); 
getch(); 
} 
void disp(int &a, int &b) 
{ 
a=a+10; 
b=b+10; 
printf(“Value of a inside function %dn”,a); 
printf(“value of b inside function %dn”,b); 
} 
EXTRA
NOTES
EXTRA
EXTRA
EXTRA
EXTRA
#include<stdio.h> 
#include<conio.h> 
int table(int,int); 
void main() 
{ 
int n,y=1,t; 
clrscr(); 
printf("Enter any non"); 
scanf("%d",&n); 
table(n,y); 
getch(); 
} 
int table(int n, int y) 
{ int t; 
if(y==11) 
{ 
return 0; 
} 
else 
{ t=n*y; 
printf("%d*%d=%dn",n,y,t); 
table(n,y+1); 
} 
return t; 
} 
EXTRA

More Related Content

What's hot

Function lecture
Function lectureFunction lecture
Function lecture
DIT University, Dehradun
 
Programming Fundamentals Decisions
Programming Fundamentals  Decisions Programming Fundamentals  Decisions
Programming Fundamentals Decisions
imtiazalijoono
 
Function in c
Function in cFunction in c
Function in c
savitamhaske
 
Call by value
Call by valueCall by value
Call by valueDharani G
 
Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
C Prog - Functions
C Prog - FunctionsC Prog - Functions
C Prog - Functionsvinay arora
 
C function presentation
C function presentationC function presentation
C function presentation
Touhidul Shawan
 
Functions
FunctionsFunctions
Functions
Pragnavi Erva
 
C Programming Language Part 6
C Programming Language Part 6C Programming Language Part 6
C Programming Language Part 6
Rumman Ansari
 
C and C++ functions
C and C++ functionsC and C++ functions
C and C++ functions
kavitha muneeshwaran
 
Function in c language(defination and declaration)
Function in c language(defination and declaration)Function in c language(defination and declaration)
Function in c language(defination and declaration)
VC Infotech
 
functions in C and types
functions in C and typesfunctions in C and types
functions in C and types
mubashir farooq
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
Abu Zaman
 
Types of function call
Types of function callTypes of function call
Types of function call
ArijitDhali
 
parameter passing in c#
parameter passing in c#parameter passing in c#
parameter passing in c#
khush_boo31
 
Pre defined Functions in C
Pre defined Functions in CPre defined Functions in C
Pre defined Functions in C
Prabhu Govind
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)
Dharma Kshetri
 

What's hot (20)

Function lecture
Function lectureFunction lecture
Function lecture
 
Programming Fundamentals Decisions
Programming Fundamentals  Decisions Programming Fundamentals  Decisions
Programming Fundamentals Decisions
 
Function in c
Function in cFunction in c
Function in c
 
Call by value
Call by valueCall by value
Call by value
 
Function in c program
Function in c programFunction in c program
Function in c program
 
Function
FunctionFunction
Function
 
C Prog - Functions
C Prog - FunctionsC Prog - Functions
C Prog - Functions
 
C function presentation
C function presentationC function presentation
C function presentation
 
Functions
FunctionsFunctions
Functions
 
C Programming Language Part 6
C Programming Language Part 6C Programming Language Part 6
C Programming Language Part 6
 
C and C++ functions
C and C++ functionsC and C++ functions
C and C++ functions
 
Function in c language(defination and declaration)
Function in c language(defination and declaration)Function in c language(defination and declaration)
Function in c language(defination and declaration)
 
Functions
FunctionsFunctions
Functions
 
functions in C and types
functions in C and typesfunctions in C and types
functions in C and types
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
 
Types of function call
Types of function callTypes of function call
Types of function call
 
parameter passing in c#
parameter passing in c#parameter passing in c#
parameter passing in c#
 
Pre defined Functions in C
Pre defined Functions in CPre defined Functions in C
Pre defined Functions in C
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
 
Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)Maharishi University of Management (MSc Computer Science test questions)
Maharishi University of Management (MSc Computer Science test questions)
 

Viewers also liked

C programming array & shorting
C  programming array & shortingC  programming array & shorting
C programming array & shorting
argusacademy
 
C programming string
C  programming stringC  programming string
C programming string
argusacademy
 
C programming session 01
C programming session 01C programming session 01
C programming session 01Dushmanta Nath
 
User defined functions in C
User defined functions in CUser defined functions in C
User defined functions in C
Harendra Singh
 
C string
C stringC string
Strings in C
Strings in CStrings in C
Strings in C
Kamal Acharya
 
C programming - String
C programming - StringC programming - String
C programming - String
Achyut Devkota
 
Functions in C
Functions in CFunctions in C
Functions in C
Kamal Acharya
 
Java script
Java scriptJava script
Java script
argusacademy
 
TALLY Payroll ENTRY
TALLY Payroll ENTRYTALLY Payroll ENTRY
TALLY Payroll ENTRY
argusacademy
 
COMPUTER Tips ‘n’ Tricks
COMPUTER Tips ‘n’   TricksCOMPUTER Tips ‘n’   Tricks
COMPUTER Tips ‘n’ Tricks
argusacademy
 
1 tally basic
1 tally basic1 tally basic
1 tally basic
argusacademy
 
VISUAL BASIC .net ii
VISUAL BASIC .net iiVISUAL BASIC .net ii
VISUAL BASIC .net ii
argusacademy
 
Computer development
Computer developmentComputer development
Computer development
argusacademy
 
TALLY 1 st level entry
TALLY 1 st level entryTALLY 1 st level entry
TALLY 1 st level entry
argusacademy
 
C programming file handling
C  programming file handlingC  programming file handling
C programming file handling
argusacademy
 
Multimedia basic
Multimedia basicMultimedia basic
Multimedia basic
argusacademy
 
Php opps
Php oppsPhp opps
Php opps
argusacademy
 
TALLY Pos ENTRY
TALLY Pos ENTRYTALLY Pos ENTRY
TALLY Pos ENTRY
argusacademy
 
Application software
Application softwareApplication software
Application software
argusacademy
 

Viewers also liked (20)

C programming array & shorting
C  programming array & shortingC  programming array & shorting
C programming array & shorting
 
C programming string
C  programming stringC  programming string
C programming string
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
User defined functions in C
User defined functions in CUser defined functions in C
User defined functions in C
 
C string
C stringC string
C string
 
Strings in C
Strings in CStrings in C
Strings in C
 
C programming - String
C programming - StringC programming - String
C programming - String
 
Functions in C
Functions in CFunctions in C
Functions in C
 
Java script
Java scriptJava script
Java script
 
TALLY Payroll ENTRY
TALLY Payroll ENTRYTALLY Payroll ENTRY
TALLY Payroll ENTRY
 
COMPUTER Tips ‘n’ Tricks
COMPUTER Tips ‘n’   TricksCOMPUTER Tips ‘n’   Tricks
COMPUTER Tips ‘n’ Tricks
 
1 tally basic
1 tally basic1 tally basic
1 tally basic
 
VISUAL BASIC .net ii
VISUAL BASIC .net iiVISUAL BASIC .net ii
VISUAL BASIC .net ii
 
Computer development
Computer developmentComputer development
Computer development
 
TALLY 1 st level entry
TALLY 1 st level entryTALLY 1 st level entry
TALLY 1 st level entry
 
C programming file handling
C  programming file handlingC  programming file handling
C programming file handling
 
Multimedia basic
Multimedia basicMultimedia basic
Multimedia basic
 
Php opps
Php oppsPhp opps
Php opps
 
TALLY Pos ENTRY
TALLY Pos ENTRYTALLY Pos ENTRY
TALLY Pos ENTRY
 
Application software
Application softwareApplication software
Application software
 

Similar to C programming function

C basics
C basicsC basics
C basicsMSc CST
 
C Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossainC Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossain
Sazzad Hossain, ITP, MBA, CSCA™
 
C Programming lab
C Programming labC Programming lab
C Programming lab
Vikram Nandini
 
Cpds lab
Cpds labCpds lab
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
Koshy Geoji
 
C Programming
C ProgrammingC Programming
C Programming
Sumant Diwakar
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
C lab programs
C lab programsC lab programs
C lab programs
Dr. Prashant Vats
 
C lab programs
C lab programsC lab programs
C lab programs
Dr. Prashant Vats
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
Ashishchinu
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
PRATHAMESH DESHPANDE
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptx
happycocoman
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
Janani Satheshkumar
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
sandeep kumbhkar
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointersvinay arora
 
Pnno
PnnoPnno
C programs
C programsC programs
C programs
Vikram Nandini
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
Wingston
 

Similar to C programming function (20)

C basics
C basicsC basics
C basics
 
C Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossainC Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossain
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 
Cpds lab
Cpds labCpds lab
Cpds lab
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
C Programming
C ProgrammingC Programming
C Programming
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
C lab programs
C lab programsC lab programs
C lab programs
 
C lab programs
C lab programsC lab programs
C lab programs
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
 
Session06 functions
Session06 functionsSession06 functions
Session06 functions
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptx
 
Fucntions & Pointers in C
Fucntions & Pointers in CFucntions & Pointers in C
Fucntions & Pointers in C
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointers
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
Pnno
PnnoPnno
Pnno
 
C programs
C programsC programs
C programs
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 

More from argusacademy

Css & dhtml
Css  & dhtmlCss  & dhtml
Css & dhtml
argusacademy
 
Html table
Html tableHtml table
Html table
argusacademy
 
Html ordered & unordered list
Html ordered & unordered listHtml ordered & unordered list
Html ordered & unordered list
argusacademy
 
Html level ii
Html level  iiHtml level  ii
Html level ii
argusacademy
 
Html frame
Html frameHtml frame
Html frame
argusacademy
 
Html forms
Html formsHtml forms
Html forms
argusacademy
 
Html creating page link or hyperlink
Html creating page link or hyperlinkHtml creating page link or hyperlink
Html creating page link or hyperlink
argusacademy
 
Html basic
Html basicHtml basic
Html basic
argusacademy
 
Php string
Php stringPhp string
Php string
argusacademy
 
Php session
Php sessionPhp session
Php session
argusacademy
 
Php oops1
Php oops1Php oops1
Php oops1
argusacademy
 
Php if else
Php if elsePhp if else
Php if else
argusacademy
 
Php creating forms
Php creating formsPhp creating forms
Php creating forms
argusacademy
 
Php create and invoke function
Php create and invoke functionPhp create and invoke function
Php create and invoke function
argusacademy
 
Php basic
Php basicPhp basic
Php basic
argusacademy
 
Php array
Php arrayPhp array
Php array
argusacademy
 
Sql query
Sql querySql query
Sql query
argusacademy
 
Rdbms
RdbmsRdbms
Oracle
OracleOracle
Oracle
argusacademy
 
Vb.net iv
Vb.net ivVb.net iv
Vb.net iv
argusacademy
 

More from argusacademy (20)

Css & dhtml
Css  & dhtmlCss  & dhtml
Css & dhtml
 
Html table
Html tableHtml table
Html table
 
Html ordered & unordered list
Html ordered & unordered listHtml ordered & unordered list
Html ordered & unordered list
 
Html level ii
Html level  iiHtml level  ii
Html level ii
 
Html frame
Html frameHtml frame
Html frame
 
Html forms
Html formsHtml forms
Html forms
 
Html creating page link or hyperlink
Html creating page link or hyperlinkHtml creating page link or hyperlink
Html creating page link or hyperlink
 
Html basic
Html basicHtml basic
Html basic
 
Php string
Php stringPhp string
Php string
 
Php session
Php sessionPhp session
Php session
 
Php oops1
Php oops1Php oops1
Php oops1
 
Php if else
Php if elsePhp if else
Php if else
 
Php creating forms
Php creating formsPhp creating forms
Php creating forms
 
Php create and invoke function
Php create and invoke functionPhp create and invoke function
Php create and invoke function
 
Php basic
Php basicPhp basic
Php basic
 
Php array
Php arrayPhp array
Php array
 
Sql query
Sql querySql query
Sql query
 
Rdbms
RdbmsRdbms
Rdbms
 
Oracle
OracleOracle
Oracle
 
Vb.net iv
Vb.net ivVb.net iv
Vb.net iv
 

Recently uploaded

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 

Recently uploaded (20)

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 

C programming function

  • 3. System Define function #include<stdio.h> #include<conio.h> #include<math.h> void main() { int num; float r; clrscr(); printf(“Enter any non”); scanf(“%d”,&num); r=sqrt(num); printf(“root of %d is %f n”, num,r); getch(); } EXTRA
  • 6. User Define Function #include<stdio.h> Parameter and no return value #include<conio.h> void add(int, int); void main() { int a,b; clrscr(); printf(“Enter two numbern”); scanf(“%d%d”,&a,&b); printf(“Value of A =%dn”,a); printf(“Value of B =%dn”,b); add(a,b); getch(); } no return void add(int x, int y) { with Parameter int z; z=x+y; printf(“Sum of two no = %dn”,z); } EXTRA
  • 7. User Define Function #include<stdio.h> Parameter and return value #include<conio.h> int add(int, int); void main() { int a,b,c; clrscr(); printf(“Enter two numbern”); scanf(“%d%d”,&a,&b); printf(“Value of A =%dn”,a); printf(“Value of B =%dn”,b); c=add(a,b); printf(“Sum of two no = %dn”,c); getch(); } with return int add(int x, int y) { with parameter int z; z=x+y; return z; } EXTRA
  • 8. User Define Function No #include<stdio.h> Parameter and no return value #include<conio.h> void disp(); void main() { clrscr(); disp(); getch(); } no return void disp() { no parameter int a,b,c; printf(“Enter two numbern”); scanf(“%d%d”,&a,&b); printf(“Value of A =%dn”,a); printf(“Value of B =%dn”,b); c=a+b; printf(“Sum of two no = %dn”,c); getch(); } EXTRA
  • 9. User Define Function No Parameter and return value #include<stdio.h> #include<conio.h> int fact(); void main() { clrscr(); printf("Factorial %d",fact()); getch(); } with return int fact() { no parameter int n,f=1; printf(" Enter any numbern"); scanf("%d",&n); while(n>=1) { f=n*f; n--; } return f; } EXTRA
  • 10. User Define Function Call by value method #include<stdio.h> #include<conio.h> void disp (int , int); void main() { int a,b; clrscr(); printf(“Enter the Value of a & bn”); scanf(“%d%d”,&a,&b); printf(“Value of a before function %dn”,a); printf(“Value of b before function %dn”,b); disp(a,b); printf(“value of a after function %dn”,a); printf(“Value of b after function %dn”,b); getch(); } void disp(int a, int b) { a=a+10; b=b+10; printf(“Value of a inside function %dn”,a); printf(“value of b inside function %dn”,b); } EXTRA
  • 11. User Define Function Call by reference method #include<stdio.h> #include<conio.h> void disp (int &, int&); void main() { int a,b; clrscr(); printf(“Enter the Value of a & bn”); scanf(“%d%d”,&a,&b); printf(“Value of a before function %dn”,a); printf(“Value of b before function %dn”,b); disp(a,b); printf(“value of a after function %dn”,a); printf(“Value of b after function %dn”,b); getch(); } void disp(int &a, int &b) { a=a+10; b=b+10; printf(“Value of a inside function %dn”,a); printf(“value of b inside function %dn”,b); } EXTRA
  • 12. NOTES
  • 13. EXTRA
  • 14. EXTRA
  • 15. EXTRA
  • 16. EXTRA
  • 17. #include<stdio.h> #include<conio.h> int table(int,int); void main() { int n,y=1,t; clrscr(); printf("Enter any non"); scanf("%d",&n); table(n,y); getch(); } int table(int n, int y) { int t; if(y==11) { return 0; } else { t=n*y; printf("%d*%d=%dn",n,y,t); table(n,y+1); } return t; } EXTRA