logo

Crowdly

Browser

Add to Chrome

Questions Bank (1256643 total)

Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.

 

 

View this question

Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.

  

View this question

Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.

 

 

View this question

Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.

 

 

View this question

Supongamos el siguiente código, donde v es un vector<int> que representa la lista [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

auto it = v.begin() + 3;

v.insert(it + 2, 33);

¿Qué lista representa v tras ejecutar este código?

View this question

Supongamos una lista v = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] implementada mediante un vector<int>. Ahora ejecutamos lo siguiente:

auto it1 = v.begin();

auto it2 = it1 + 2;

auto it3 = it1 + 3;

auto it4 = it1 + 4;

auto it5 = v.end();

v.erase(v.begin() + 3);

Suponiendo que el array no se redimensiona durante la operación. ¿Qué iteradores se invalidan tras la operación de borrado?

View this question

El siguiente programa realiza un recorrido de un vector<int>, imprimiendo sus elementos desde el final hasta el principio.

auto it = v.end();

while (it != v.begin()) {

cout << *it << " ";

it--;

}

¿Es correcto?

0%
0%
View this question

El siguiente programa realiza un recorrido de un vector<int>, imprimiendo sus elementos desde el final hasta el principio.

auto it = v.end();

while (it != v.begin()) {

it--;

cout << *it << " ";

}

¿Es correcto?

0%
0%
View this question

Supongamos que v es un vector<int> de tamaño par. ¿Qué hace el siguiente programa?

auto it = v.begin();

int half_size = v.size() / 2;

for (int i = 0; i < half_size; i++) {

*(it + half_size) = *it;

++it;

}

0%
0%
0%
View this question

Financial literacy is an individual journey.

0%
100%
View this question