Skip to content

Instantly share code, notes, and snippets.

@austa
Created March 22, 2013 21:19
Show Gist options
  • Select an option

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

Select an option

Save austa/5224842 to your computer and use it in GitHub Desktop.
/*
* File: main.c
* Author: alaattin
*
* Created on 22 Mart 2013 Cuma, 23:15
*/
#include <stdio.h>
#include <stdlib.h>
/*
*
*/
int myStrlenV2(char* );
int main(int argc, char** argv) {
char* kelime = "Alaattin Usta";
printf("Kelimenin harf sayısı: %d \n", myStrlenV2(kelime));
return (EXIT_SUCCESS);
}
int myStrlenV2(char* kelimem){
int sayac = 0;
while(*kelimem != '\0'){
sayac++;
kelimem++;
}
return sayac;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment