Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int *p, int *p1);
- ////////////////////////////////////////////////
- int main() //
- {
- int a = 15,
- b = 26;
- foo(&a, &b);
- }
- ///////////////////////////////////////////////
- void foo(int *p, int *p1) //
- {
- int &r1 = *p ,
- &r2 = *p1;
- if(r1 < r2) printf("%d\n", r2);
- else printf("%d\n", r1);
- }
- /*
- #include <stdio.h>
- ////////////////////////////////////////////////
- void foo(int* p1, int* p2)
- {
- int b ;
- b = *p1;
- *p1 = *p2;
- *p2 = b ;
- }
- ///////////////////////////////////////////////
- int main()
- {
- int a = 21,
- n = 25;
- foo(&a, &n);
- printf("a = %d, n = %d\n", a, n);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement