32. Display reverse string without using string function.


Comments

  1. sayali daunde11:39 AM

    //reverse the string without using string
    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j=0;
    printf("Enter a string=");
    gets(str);
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }
    }

    ReplyDelete
  2. Pandhare Dipali11:40 AM

    /*To display the Reverse of sring*/
    #include
    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("\n\t Enter the string");
    gets(str);
    printf("\n\t the reverse string:");
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("\n\t operated string is %c",str[j]);
    }
    }

    ReplyDelete
  3. poonam pusavale11:42 AM

    /*reverse of string*/
    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("\n\t enter a string");
    gets(str);
    printf("\n\t enter reverse string");
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }
    }

    ReplyDelete
  4. // reverse of string without using string function--
    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("\t Enter any string--");
    gets(str);
    while(str[i]!=NULL)
    {
    i++;
    }
    printf("\t String after reverse==");
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }
    }

    ReplyDelete
  5. Swati Waghmare11:50 AM

    /* To display the Reverse of string*/
    #include
    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j=0;
    printf("\n\t Enter a string");
    gets(str);
    printf("\n\tReverseof a string",str);
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }

    }

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. #include
    #include
    void main()
    {
    char s[50],rev[50];
    int i=0,j=0;
    printf("enter string =");
    scanf("%s",s);

    while(s[i]!='\0')
    {
    i++;
    }
    i--;
    while (i>=0)
    {
    rev[j] = str[i];
    j++;
    i--;
    }
    rev[j]='\0';
    printf("Reverse of string is : %s\n",rev);
    }

    ReplyDelete
  8. sushma jadhav11:54 AM

    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("\n\t enter a string");
    scanf("%s",str);
    printf("\n\t enter reverse string");
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }
    }

    ReplyDelete
  9. puja khandare12:06 PM

    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("\n\t Enter the string");
    gets(str);
    printf("\n\t the reverse string:");
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("\n\t operated string is %c",str[j]);
    }
    }

    ReplyDelete
  10. Dipali Kore12:10 PM

    //revers the given string
    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("enter ur string");
    gets(str);

    printf("revers the string");
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }
    printf("\n");
    }

    ReplyDelete
  11. sonali nagane12:10 PM

    #include
    #include
    void main()
    {
    char str[10];
    int i=0,j;
    printf("\n Enter the string");
    gets(str);
    printf("\n the reverse string:");
    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("\nstring is %c",str[j]);
    }
    }

    ReplyDelete
  12. Bhanvase Yashoda12:28 PM

    /*count vowel & consonent*/
    #include
    #include
    #include
    void main()
    {

    char str[8];
    int cnt1=0,cnt2=0; int i;
    printf("\n\t enter sting");
    gets(str);
    while(str[i]!=NULL)
    {
    if(i=='a'||i=='e'||i=='i'||i=='o'||i=='u')
    {
    cnt1++;
    }
    else
    {
    cnt2++;
    }
    i++;
    }
    printf("total vowel=%d,consonent=%d",cnt1,cnt2);





    }

    ReplyDelete
  13. Bhanvase Yashoda12:33 PM

    /*revers string*/
    #include
    #include
    void main()
    {

    char str[10]="sknscoe";
    int i=0,j=0;

    while(str[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }








    }

    ReplyDelete
  14. Bhosale Dhanashri SE310:29 AM

    // reverse of the string


    #include
    #include
    void main()
    {
    char s[10];
    int i=0;
    int j;
    printf("\n\t Enter the string");
    gets(s);
    for(j=i;j>=0;j--)
    {

    printf("\n\t string=%c",s[j]);



    }

    }

    ReplyDelete
  15. #include
    #include
    void main()
    {
    char str[100];
    int i=0,j=0;


    printf("\n\tEnter a string=");
    scanf("%s",str);
    while(str[i]!=NULL)
    {

    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("%c",str[j]);
    }
    }

    ReplyDelete
  16. sachita jadhav11:14 AM

    /* reverse of string */
    #include
    #include
    #include
    void main()
    {
    char str[10];
    int i=0;j=0;
    printf("enter string");
    gets(str);
    while(str[i]!=NULL)
    {
    i++;
    for(j=i;j>=0;j--)

    printf("%c",str[j]);

    }
    }

    ReplyDelete
  17. Awate Snehal11:59 AM

    /*Revese a string*/
    #include
    #include
    void main()
    {
    char s[7];
    int i=0,j=0;
    printf("\n\t enter a string");
    gets(s);
    while(s[i]!=NULL)
    {
    i++;
    }
    for(j=i;j>=0;j--)
    {
    printf("\n\t reverce string=%c",s[j]);
    }
    }

    ReplyDelete

Post a Comment