parameters (data) between modules, what functions are, and how to use them.

User Generated

byyvrcbyyvr

Programming

Description

  • How parameters are used when calling modules?

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer


if you want to use same block of code repeatedly then we use function

function reduce the effort write same code repeatedly. we can just call the function work is done.

for example

int sum( int a , int b ) // It is called function definition 

{ int result ;

result = a + b ;

return result;

}

int main ( void )

{

int sum1 = sum(10,20); // function call

int sum2 = sum(20,20);

int sum3 = sum(30,30);

printf("%d",sum1); // 30

printf("%d",sum2); // 40

printf("%d",sum3); // 60

}



Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags