int main nt a 1 int b a nt c 10 funcla printfd d a b c
int main() { nt a = 1; int \'b = &a; nt c = 10; funcl(a); printf(\"%d %d\ \", a, \"b, c); a = 1; c = 10; *b = func2(a); printf(\"%d %d %d\ \', a, *b, c); a = 1; b = &c; c = 10; b = func4(&a;); printf(\"%d %d %d\ \", a, *b, c); a = 1 c = 10; a = func5(&a;); printf(\"%d %d %d\ \", a, *b, c); a = 1; c = 10; b = func6(&a;); printf(\"%d %d %d\ \", a, *b, c); system (\"pause\"); return(0) }
Solution
The question is incomplete as it doesn\'t mention the declaration of individual functions func1, func2....func6.
The value of the variable a/b/c will depend on the return value of the respective functions.
If the parameter passed is a reference, the value might as well get changed. But if it is passed as value, any changes will not reflect in the calling function.
Ex : c = func3 (a) --> a is passed by value, so the value cannot be changed globally and is not reflected in the calling fucntion.
b = func6(&a) --> a is passed as reference, so the value,if changed in the called function will reflect in the calling function.
