Buscar

None of the previous approaches solve the problem without using the escape character \. Consider the following code: The code is written in Ruby l...

None of the previous approaches solve the problem without using the escape character \. Consider the following code:

The code is written in Ruby language.
The code shows different ways to declare special strings in Ruby.
The %q notation allows variable interpolation.
The %Q notation does not allow variable interpolation.
a) Only statements I and II are correct.
b) Only statements II and III are correct.
c) Only statements III and IV are correct.
d) Only statements I and IV are correct.
e) All statements are correct.

Essa pergunta também está no material:

Ruby - Aprenda a programar na linguagem mais divertida - Casa do Codigo
254 pág.

Português Escola Colegio Estadual Barao Do Rio BrancoEscola Colegio Estadual Barao Do Rio Branco

💡 1 Resposta

User badge image

Ed Verified user icon

A alternativa correta é a letra b) Apenas as afirmações II e III estão corretas. A afirmação I está incorreta, pois o %q também não permite interpolação de variáveis. A afirmação IV está incorreta, pois o %Q permite interpolação de variáveis. Portanto, apenas as afirmações II e III estão corretas.

0
Dislike0

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais