1 / 4

Programación

Programación. Arreglos. Gabriela Araya Baez Estudiante Ingeniería Civil Industrial. Arreglos. Los arreglos son casillas virtuales que permiten agrupar datos utilizando un mismo identificador. Para acceder a estos se utilizan subíndices, como un contador en un ciclo repetitivo.

derron
Download Presentation

Programación

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programación Arreglos Gabriela Araya Baez Estudiante Ingeniería Civil Industrial

  2. Arreglos • Los arreglos son casillas virtuales que permiten agrupar datos utilizando un mismo identificador. Para acceder a estos se utilizan subíndices, como un contador en un ciclo repetitivo. • Características: -Las variables incluidas en el arreglo son del mismo tipo que este(char, int, float). -Los arreglos pueden tener 1 o más dimensiones(más de una son matrices). -El contador que recorre al arreglo es un numero entero. -Siempre comienzan con el subíndice 0. Por esto el último valor se ubica en [largo-1].

  3. Arreglos unidimensionales • Estos arreglos son una fila con muchas casillas, dentro de ellas pueden ir variables solo un tipo, es decir, solo habrán int, float, o char, pero nunca mesclados. • Los arreglos se declaran de la siguiente forma: tipo_variablenombre[largo];

  4. Tipos de arreglos: • Int : este tipo de casillas solo almacenará números enteros, por ejemplo: inttelefono_usuario[6] ; • Float: este tipo de casillas solo almacenará números decimales, por ejemplo: floatnotas_alumno[10] ; • char: casillas almacenará caracteres(letras, números, o símbolos), también llamado string, siempre el largo de este debe tener un espacio mas para poder agregar este símbolo al final ‘\0’ ejemplo: charrut[11] ; el rut tiene 10 caracteres pero necesito uno mas para agregar mi \0

More Related