introducao_c_camillo_pucpr
136 pág.

introducao_c_camillo_pucpr


DisciplinaAlgoritmos e Estrutura de Dados I702 materiais7.920 seguidores
Pré-visualização31 páginas
___________________________________________________________
__________________________________________________________ _
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_________ __________________________________________________
Aspectos Formais da Computação - linguagem C
Prof. Camillo Oliveira
pág. 56
11. O tipo de dado CLIENTE pode ser identificado pelo nome (40 bytes), número do registro geral (RG) (8
bytes), data de nascimento, endereço, fone. Defina o tipo CLIENTE, utilizando quando puder os tipos
anteriores já definidos.
___________________________________________________________
___________________________________________________________
___________________________________________________________
____________________________________________ _______________
___________________________________________________________
___________________________________________________________
___________________________________________________________
________________________________________________________ ___
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_______ ____________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________ ________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_______________________________ ____________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________ ________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_______________________________________________________ ____
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
______ _____________________________________________________
___________________________________________________________
Declare um conjunto de 20 (vinte) clientes do tipo CLIENTE.
___________________________________________________________
Aspectos Formais da Computação - linguagem C
Prof. Camillo Oliveira
pág. 57
Supondo o endereço inicial igual à 100D16. Qual o endereço do décimo cliente. (Dê o resultado em
hexadecimal)
___________________________________________________________
___________________________________________________________
___________________________________ ________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_______________________________________________ ____________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
__________ _________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
______________________ _____________________________________
Aspectos Formais da Computação - linguagem C
Prof. Camillo Oliveira
pág. 58
12. Uma apólice de seguro de vida pode ser formada pelo número da apólice, CLIENTE, ENDEREÇO, valor
da apólice, prêmio (%), nome do beneficiário (40 bytes) e data de aniversário. Defina o tipo APL_VIDA
(apólice de vida).
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___ ________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_______________ ____________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________ ________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
_______________________________________ ____________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________ ________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
______________ _____________________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
__________________________ _________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
______________________________________ _____________________
___________________________________________________________
Aspectos Formais da Computação - linguagem C
Prof. Camillo Oliveira
pág. 59
13. Uma apólice de seguro de automóvel pode ser composta pelo número da apólice, CLIENTE,
ENDEREÇO, valor da apólice, prêmio (%), depreciação, licença (10 bytes), unidade da federação (UF),
modelo (15 bytes) e ano de fabricação. Defina o tipo APL_AUTO (apólice de automóvel).
___________________________________________________________
___________________________________________________________
__________________________ _________________________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
______________________________________ _____________________
___________________________________________________________
___________________________________________________________
___________________________________________________________
__________________________________________________ _________
___________________________________________________________