Pass value
#include <stdio.h>
int change(int number);
void main()
{
int number = 20;
int result = 12;
result = change(number);
printf("\n In main, result = %d \t number = %d", result, number);
}
int change(int number) {
number = 2 * number;
printf("\n In function change, number = %d\n", number);
return number;
}
Related examples in the same category