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

Programming
Tutor: None Selected Time limit: 1 Day

  • How parameters¬†are used when calling modules?
Sep 16th, 2014


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

}


Sep 16th, 2014

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Sep 16th, 2014
...
Sep 16th, 2014
Dec 10th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer