

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
These notes explain the concept of in and out parameters in c programming, using examples of functions with both in and out parameters, and void functions. It also covers the use of pointers in passing arguments to functions.
Typology: Lab Reports
1 / 2
This page cannot be seen from the preview
Don't miss anything!
replacewithdouble needs a value for num in order to do the calculation. So num is an in parameter. But then the doubled value goes back to main by num , so num is also an out parameter. To use replacewithdouble: in main need a variable with a value
then call replacewithdouble(&i);
x is an in parameter , but there is no out parameter here so the answer is lost and never goes to main. II
amount is an in parameter q, d, n, p are out parameters only, but the arguments passed to them must be set up ahead of time so there is someplace for the answers to go. There is also a return value which can be copied to yet another variable. 1 of 2 3/22/09 9:55 PM
The function call:
2 of 2 3/22/09 9:55 PM