Advertisement
bilasi

Untitled

Apr 21st, 2014
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. char a[100], b[100];
  5. gets(angel);
  6. int i;
  7. for(i = 0; a[i]!='\0'; i++){
  8. b[i] = a[i];
  9. }
  10. b[i] = a[i];
  11. printf("%s", b);
  12. return 0;
  13. }
  14.  
  15.  
  16.  
  17. /*Reverse*/
  18. #include<stdio.h>
  19. int main()
  20. {
  21. char str[100];
  22. gets(str);
  23. int len = 0, i;
  24.  
  25. for(i = 1; str[i]!='\0'; i++){
  26. len = len + 1;
  27. }
  28. for(i = len; i>=0; i--){
  29. printf("%c", str[i]);
  30. }
  31.  
  32. return 0;
  33. }
  34.  
  35.  
  36.  
  37. /* length
  38. #include<stdio.h>
  39. int main()
  40. {
  41. char str[100], i, j;
  42. gets(str);
  43. int len = 0;
  44. for(i = 0; str[i]!='\0'; i++)
  45. {
  46. len = len + 1;
  47. }
  48. printf("%d", len);
  49. return 0;
  50. }
  51. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement