Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include <stdio.h>
  2. int a,b,c;
  3.  
  4. void p2 (int * b, int h )
  5.  
  6. {
  7. int c;
  8. a = 6;
  9. printf("a= %d\n",a);
  10. c=*b + h;
  11. printf("c= %d\n",c);
  12. printf ("Esto es del procedimiento %d - %d - %d\n", a,* b, c);
  13. }
  14.  
  15. int accion( int * b)
  16. {
  17. int a;
  18. a = 5;
  19. printf("a= %d\n",a);
  20. *b = a * a;
  21. printf("*b= %d\n",*b);
  22. c = * b - a;
  23. printf("c= %d",c);
  24.  
  25. printf ("Estos son los valores actuales %d - %d - %d\n", a, * b, c);
  26. p2 ( &c, *b );
  27. printf ("Estos son los valores después del procedimiento %d - %d - %d\n", a, * b, c);
  28. return ( * b );
  29. }
  30.  
  31. int main ( )
  32. {
  33. a = 4;
  34. printf("a= %d\n",a);
  35. b = 0;
  36. printf("b= %d\n",b);
  37. c = accion ( &a );
  38. printf("c= %d\n",c);
  39. printf ("Estos son los valores finales %d - %d - %d\n", a, b, c);
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement