Skip to content

Instantly share code, notes, and snippets.

@austa
Created March 19, 2013 11:25
Show Gist options
  • Select an option

  • Save austa/5195377 to your computer and use it in GitHub Desktop.

Select an option

Save austa/5195377 to your computer and use it in GitHub Desktop.
/*
* File: main.c
* Author: alaattin
*
* Created on 19 Mart 2013 Salı, 13:18
*/
#include <stdio.h>
#include <stdlib.h>
/*
*
*/
void reserve(char []);
int main(int argc, char** argv) {
char kelime[15];
printf("Bir kelime giriniz: \n");
scanf("%s", kelime);
reserve(kelime);
return (EXIT_SUCCESS);
}
void reserve(char kelime[]){
int i = 0, sayac = 0;
for(i = 0; kelime[i] != '\0'; i++){
sayac++;
}
for(i = sayac; i >= 0; i--){
printf("%c", kelime[i]);
}
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment