208 views
2 votes
2 votes
How computation actually occurs in these type of questions?
For ex:

If I declare a=10,b=20

and pass them f(a-b,a*2,b-a);

Where f has signature like f(int *p,int *q,int *r).How actually things works out if i manipulate are there any temprary variables involved?

1 Answer

0 votes
0 votes
store the value of a-b,a*2, b-a in seperate memory locations. pass their memory addresses in p,q,r respectively bcoz call by reference.

Related questions

0 votes
0 votes
2 answers
1
Debargha Mitra Roy asked Apr 10
102 views
What is the output of the below code?#include <stdio.h void main() { static int var = 5; printf("%d ", var ); if (var) main(); }a. 1 2 3 4 5b. 1c. 5 4 3 2 1d. Error
1 votes
1 votes
0 answers
2
RahulVerma3 asked Mar 22
140 views
My question is that can we use command line arguments without use of main function's parameters argc and *argv?