Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 15, 2022 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/c20128c4ebdaa591ab79c210ad969611 to your computer and use it in GitHub Desktop.
Save parzibyte/c20128c4ebdaa591ab79c210ad969611 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main()
{
// https://parzibyte.me/blog
char cadena[] = "parzibyte.me";
int indice;
for (indice = 0; indice < strlen(cadena); indice++)
{
char actual = cadena[indice];
printf("Tenemos el caracter '%c'\n", actual);
}
indice = 0;
while (cadena[indice] != '\0')
{
char actual = cadena[indice];
printf("Tenemos el caracter '%c'\n", actual);
indice++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment