•//
FunctionParameters.cpp
•#include
<stdio.h>
•#include
"Arithmetic.h"
•
•int
main(int argc, char* argv[])
•{
• int a, b;
•
• printf("Enter a and b:
");
• scanf("%d %d", &a,
&b);
•
• if (arithmetic (a, &b))
• {
• printf("Result = %d",
b);
• }
•
• return 0;
•}
// Arithmetic.h
#ifndef __ARITHMETIC_H__
#define __ARITHMETIC_H__
bool arithmetic (int a, int
*b);
#endif
// Arithmetic.cpp
#include
"Arithmetic.h"
bool arithmetic (int a, int
*b)
{
if (!b)
{
return false;
}
*b = *b + a;
++a;
*b = a * *b;
return true;
}