Skip to content

Instantly share code, notes, and snippets.

@fsouza
Created November 2, 2010 20:54
Show Gist options
  • Save fsouza/660285 to your computer and use it in GitHub Desktop.
Save fsouza/660285 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main () {
char *pais = "Brasil";
int tamanho = strlen(pais), i;
printf("Ao contrário: ");
for (i = tamanho; i >= 0; i--) {
printf("%c", *(pais + i));
}
printf("\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment