variable change not recorded

hi, i'll cut to the chase :D
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<stdio.h>

double AAA=1, BBB=2 ;

void app(double a, double b)
{
 a = a +100 ;
 b = b + 10 ;
}

int main (void)

{
 app(AAA, BBB);
 printf("n %f %fn",AAA,BBB);
 
 return 0 ;
} 


the new values for AAA and BBB are not recorded. what am i missing ?
app needs to take references if you want AAA and BBB to be modified by app. Otherwise app is just modifying a and b which are copies of AAA and BBB.
Topic archived. No new replies allowed.