Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created Apr 12, 2020
Embed
What would you like to do?
#define MAXIMA_LONGITUD 50
// Un arreglo de cadenas. Más:
// https://parzibyte.me/blog/2018/11/08/arreglos-de-cadenas-en-c/
char nombres[][MAXIMA_LONGITUD] = {"Bill",
"Luis",
"Pedro",
"Francisco",
"Richard",
"Steve",
"Leon Scott Kennedy",
"Claire Redfield"};
int longitud = sizeof(nombres) / sizeof(nombres[0]);
printf("Nombres alineados a la derecha:\n\n");
for (int x = 0; x < longitud; x++) {
printf("|%20s|\n", nombres[x]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment