Quiz on Strings

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas What is the result of Occurs_ct(3, s)

2

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas What is the result of |t|

3

For all questions, consider the following strings s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas What is the result of u o u

<1, 4, 1, 4>

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas What is the result of u o t

<1, 4, 5, 3, 8>

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas What is the result of Reverse(s)

<3, 2, 7, 5, 3>

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas What is the result of Prt_Btwn(1, 4, s)

<5, 7, 2> Note: Prt_Btwn(n, m, string) n is included, m is excluded, positioning starts at 0.

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas How would you use the above strings and our string notation to get the string <1, 2, 3, 4>?

Prt_Btwn(0, 1, u)

How would you use our string notation to get the first value out of an unknown string -v?

Prt_Btwn(0, 1, v)

How would you use our string notation to get the last value out of an unknown string v?

Prt_Btwn(|v| - 1, |v|, v)

s = <3, 5, 7, 2, 3> t = <5, 3, 8> u = <1, 4> Note: when typing a string as an answer, please enclose it in the angle brackets, and separate the values with commas How would you use the above strings and our string notation to get the string <1, 4, 4, 1>?

u o Reverse(u)


Ensembles d'études connexes

Geography Chapter 8 Review, Chapter 8

View Set

"Teoría del Acto Jurídico" - Preparación Examen de Grado

View Set