Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- struct horario{
- int horas;
- int minutos;
- int segundos;
- };
- int main(void){
- struct horario teste(struct horario x);
- struct horario agora;
- agora.horas = 10;
- agora.minutos = 30;
- agora.segundos = 25;
- struct horario proxima;
- proxima = teste(agora);
- printf("%i:%i:%i\n", proxima.horas,
- proxima.minutos,
- proxima.segundos);
- return 0;
- }
- struct horario teste(struct horario x){
- printf("%i:%i:%i\n", x.horas,
- x.minutos,
- x.segundos);
- x.horas = 05;
- x.horas = 03;
- x.segundos = 06;
- return x;
- }
- //Sobre:
- //Aula: Passar e Receber Estruturas à uma Função
- //Video: https://www.youtube.com/watch?v=9ycgQb8dGUg&t=2s
- //Data: 22/01/2021
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement