Skip to content

Instantly share code, notes, and snippets.

@nuryslyrt
Created November 19, 2011 18:49
Show Gist options
  • Save nuryslyrt/1379210 to your computer and use it in GitHub Desktop.
Save nuryslyrt/1379210 to your computer and use it in GitHub Desktop.
stringi ters çeviriyoruz.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
myswap();
}
int myswap(void)
{
char *str;
register int t;
str = malloc(100);
if(!str)
{
printf("yine bekleriz.\n");
exit(1);
}
printf("String nerde: ");
gets(str);
for (t = strlen(str)-1; t >= 0; t--)
{
putchar(str[t]);
}
printf("\n");
free (str);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment