Pular para o conteúdo principal

Questão de Programação — Delphi — CESPE / CEBRASPE 2007

ProgramaçãoDelphi
Código
ce261119
Banca
CESPE / CEBRASPE
Órgão
TRE-TO
Ano
2007
Nível
Superior
Cargo
Analista Judiciário - Análise de Sistemas
Considerando o código Pascal apresentado, que foi desenvolvido utilizando-se o ambiente Delphi, assinale a opção que apresenta trecho de código que, ao ser inserido adequadamente nas linhas 27, 31 e 40, mantém a correção sintática e semântica original.
  1. AL.27 function ListaHash.hash (texto) : integer;L.31 for i:= 1 to Length (texto)L.40 while a [x].chave <> ' '
  2. BL.27 function ListaHash.hash (string) : integer; L.31 for (i:= 1; I < Length (texto) ; i++) L.40 while (a[x] .chave != ' ')
  3. CL.27 function ListaHash.hash (texto:string) : integer;L.31 for i:= 1 to Length (texto) doL.40 while a [x].chave <> ' ' do
  4. DL.27 procedure ListaHash.hash (texto:string);L.31 for i:= 1 to Length (texto) doL.40 while a [x].chave <> ' ' do
  5. EL.27 procedure ListaHash.hash (texto:string): integer;L.31 for i:= 1 to Length (texto) doL.40 while a [x].chave <> ' ' do
Revelar gabarito e comentário

GabaritoC — L.27 function ListaHash.hash (texto:string) : integer; L.31 for i:= 1 to Length (texto) do L.40 while a [x].chave <> ' ' do

Link permanente: /questoes/ce261119