Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int a,b,c;
- void p2 (int * b, int h )
- {
- int c;
- a = 6;
- printf("a= %d\n",a);
- c=*b + h;
- printf("c= %d\n",c);
- printf ("Esto es del procedimiento %d - %d - %d\n", a,* b, c);
- }
- int accion( int * b)
- {
- int a;
- a = 5;
- printf("a= %d\n",a);
- *b = a * a;
- printf("*b= %d\n",*b);
- c = * b - a;
- printf("c= %d",c);
- printf ("Estos son los valores actuales %d - %d - %d\n", a, * b, c);
- p2 ( &c, *b );
- printf ("Estos son los valores después del procedimiento %d - %d - %d\n", a, * b, c);
- return ( * b );
- }
- int main ( )
- {
- a = 4;
- printf("a= %d\n",a);
- b = 0;
- printf("b= %d\n",b);
- c = accion ( &a );
- printf("c= %d\n",c);
- printf ("Estos son los valores finales %d - %d - %d\n", a, b, c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement