Professional Documents
Culture Documents
ANDHRA PRADESH
Name : Murali Krishna Chintala
Designation : Lecturer in CME
Branch : Computer Engineering
Institute : SUVR & SR GPW, Ethamukkala
Year/ Semester : III Semester
Subject Name : UNIX & C
Subject Code : CM – 304
Topic : Understand Modular Programming
Duration : 50 Min
Sub Topic : Function call techniques
Teaching Aids : PPT, Animations
CM304.62 1
Objective
CM304.62 2
Function parameters
CM304.62 3
Calling a function
- It’s name,
CM304.62 4
Calling a function
Contd..
CM304.62 5
Calling a function
contd..
Examples:-
main()
{
int a,b,c;
--------
max(a,b,c);/* a,b,c are actual parameters*/
--------
}
CM304.62 6
Calling a function
contd..
Example:-1
int max(int x, int y, int z) /* x,y,z are formal
parameters*/
{
------
------
}
CM304.62 7
Calling a function
contd..
CM304.62 8
Calling a function
contd..
Example:-2
#include<stdio.h>
main()
{
int product = mul(10,10);
printf(“The result is:%d”, product);
}
int mul(int i, int j)
{
return(i*j);
}
CM304.62 9
Summary
In this class, you have learnt..
CM304.62 10
Quiz
b) Different
c) None
CM304.62 11
Quiz
b) Different
c) None
CM304.62 12
Quiz
2.The ratio between formal and actual parameters
is..
a) 1:1
b) 1:2
c) Many
CM304.62 13
Quiz
a) 1:1
b) 1:2
c) Many
CM304.62 14
Frequently Asked Questions
CM304.62 15