Applied Course 2019 Mock1-17
What is the output of the following c program void fun1(int *a, int *b, int *c) { *a = *b; *b = *c; *c = *a; } Void fun2(int a, int b, int c) { a = b; b = c; c = a; } int main() { int a = 5, b =10, c =15; fun1(&a, &b, &c); fun2(a, b, c); printf("%d", a+b-2*c); return 0; } $20$ $40$ $5$ $-5$
What is the output of the following c program void fun1(int *a, int *b, int *c) { *a = *b; *b = *c; *c = *a; } Void fun2(int a, int b, int c) { a = b; b = c; c = a; } int main() { int a = 5, b =10, c =15; fun1(&a, &b, &c); fun2(a, b, c); printf("%d", a+b-2*c); return 0; } $20$ $40$ $5$ $-5$
asked
Jan 16, 2019
in Unknown Category
Applied Course
101 views