Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- // Es una buena práctica definir el prototipo de las funciones aquí arriba
- // ojo: sólo el prototipo, no el cuerpo
- int incrementar(int numero);
- int main(int argc, char const *argv[])
- {
- int numero = 10;
- printf("Antes de llamar a la funcion, numero es %d\n", numero);
- incrementar(numero);
- printf("Despues de llamar a la funcion, numero es %d", numero);
- }
- // Ahora sí definimos la función con todo y cuerpo
- int incrementar(int numero){
- //Incrementar en 1
- numero = numero + 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement