Advertisement
Guest User

dupa

a guest
May 28th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. char na_male(char);
  6. char * na_male2(char *);
  7.  
  8. int main(int argc, char *argv[]){
  9.  
  10. char * tekst=strdup("AsDfGhHjKLPju");
  11. printf("%s\n",na_male2(tekst));
  12.  
  13. }
  14.  
  15. char na_male(char c)
  16. {
  17. if( c>='A' && c<='Z')
  18. {
  19. c-='A'-'a';
  20. }
  21.  
  22. return c;}
  23. char *na_male2(char *s)
  24. {
  25. char * tmp = strdup(s);
  26. char i,d = strlen(tmp);
  27. for (i=0; i<d; i++) tmp[i]=na_male(tmp[i]);
  28. return tmp;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement