Skip to content

Instantly share code, notes, and snippets.

@bcho
Created November 6, 2012 09:16
Show Gist options
  • Select an option

  • Save bcho/4023642 to your computer and use it in GitHub Desktop.

Select an option

Save bcho/4023642 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void func(char *s, char *t);
int main()
{
char s[] = "time", t[100];
func(s, t);
printf("%s", t);
return 0;
}
void func(char *s, char *t)
{
while (*(s++))
;
while ((*(t++) = *(s--)))
;
t--;
printf("%d", *t);
printf("%s\n", t);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment