SHARE
TWEET

String01

Sabid2830 Dec 14th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4. char str1[50]="Daffodil";
  5. char str2[50];
  6. int i=0,len=0,j=0;
  7. while(str1[i]!='\0)
  8. {
  9. i++;
  10. len++;
  11. }
  12. for(j=0,i=len-1;i>=0;i--,j++)
  13. {
  14. str2[j]=str1[i];
  15. }
  16. str2[j]=str1[i];
  17. printf("len=%d\n,len");
  18. printf("str1=%s\n",str1);
  19. printf("str2=%\n",str2)
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top