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.
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
0
Faça como milhares de estudantes: teste grátis o Passei Direto
Compartilhar