+ 5

Explain change in c programme

work of change in c https://code.sololearn.com/cRT6VcJOCK72/?ref=app

31st Mar 2018, 7:55 PM
Arman khosla
Arman khosla - avatar
6 ответов
+ 4
When an argument is passed by value, the C function receives a copy of the actual value of the argument. So, any change to the variable passed by value within function doesn't change actually value
1st Apr 2018, 7:38 AM
H. Ahmadian
H. Ahmadian - avatar
+ 4
Change Function!? What's it!? Are you sure, it is part of C!?
31st Mar 2018, 8:02 PM
H. Ahmadian
H. Ahmadian - avatar
+ 4
/* Try This Code in SoloLearn CodePlayground! */ #include <stdio.h> int change (int); int main() { int a = 4; printf("\n\n change = %d \n a(outside change function) = %d", change(a), a); return 0; } int change (int a) { printf("\n \a a(within change function) = %d",++a); return a; }
1st Apr 2018, 7:03 AM
H. Ahmadian
H. Ahmadian - avatar
+ 3
You're Welcome!
1st Apr 2018, 7:47 AM
H. Ahmadian
H. Ahmadian - avatar
+ 1
never heard of a change function,im sure you mean something else
31st Mar 2018, 8:05 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
thanks sir
1st Apr 2018, 7:45 AM
Arman khosla
Arman khosla - avatar