06.05.2013 Views

CONTENIDO DE LA LECCIÓN 18

CONTENIDO DE LA LECCIÓN 18

CONTENIDO DE LA LECCIÓN 18

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MIGUEL Á. TOLEDO MARTÍNEZ<br />

3. Un prototipo para una función llamada prueba() que modificará sólo un elemento en el arreglo de la<br />

pregunta 2 es:<br />

void prueba(char &elementoDelArreglo);<br />

4. Un enunciado que llamará a la función anterior para modificar el elemento almacenado en el<br />

índice[5] del arreglo en la pregunta 2 es:<br />

prueba(caracteres[5]);<br />

RESPUESTA EXAMEN BREVE 38<br />

1. La definición de un arreglo inicializado con los valores enteros de –3 a +3 es:<br />

int numeros[7] = [-3, -2, -1, 0, 1, 2, 3};<br />

o<br />

int numeros[] = [-3, -2, -1, 0, 1, 2, 3};<br />

2. La dimensión del arreglo antes mencionado es 1 x 7.<br />

3. El contenido del arreglo char lenguaje[51 = {‘C’, ‘+’, ‘+’}; es:<br />

[‘C] [‘+’] [‘+’] [‘\0’] [‘\0’]<br />

4. El contenido del arreglo char lenguaje[] = "C++"; es;<br />

[‘C] [‘+’] [‘+’] [‘\0’]<br />

5. Un carácter terminador nulo (‘\0’) se coloca en cada posición de un arreglo de caracteres definido<br />

globalmente sin ningún valor de inicialización.<br />

ARREGLOS, APUNTADORES Y ESTRUCTURAS – <strong>LECCIÓN</strong> <strong>18</strong> <strong>18</strong>-78

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!