Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int n);
- ///////////////////////////////////////////
- int main() //
- {
- int n = 9;
- foo(n);
- printf("address of n from main = %d\n", &n);
- }
- ///////////////////////////////////////////
- void foo(int n) //
- {
- n = n + 1;
- printf("address of n = %d from foo\n", &n);
- }
- /*
- #include <stdio.h>
- int foo(int n);
- ///////////////////////////////////////////
- int main() //
- {
- int nSerial = 0,
- nOst = 0,
- n = 0;
- scanf("%d", &n);
- nSerial = n/7;
- nOst = n%7;
- int n2 = foo(nOst);
- printf("n2 = %d \n", n2);
- }
- ///////////////////////////////////////////
- int foo(int n) //
- {
- int nSumm = 0,
- nPrice = 1000;
- for(int i = 1; i <= n; i++)
- {
- nSumm = nSumm + nPrice;
- nPrice = nPrice - 55;
- }
- return nSumm;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement