Write a program to input a string and print it in reverse order using C programming?

Follow
  • Follow publicly
  • Follow privately
  • Unfollow
please,please, give me the answer as soon as possible to give.i am desperately waiting for it.i am new in programming.and please don't forget to give the answer in C not in ...show more
Best Answer
If you are so interested in coputer science then why can you not write these programs yourself?

Write a C program to generate the Fibonacci series using Recursive function?
Write a C program which read a file containing some number.write even no. in even.txt & odd in odd.txt?
Assume str1,str2 & st3 are 3 string variables.write a program to copy content of str1 to str3 & joint in str2?
Write a program which will read a number and output it's octal and hexadecimal representations using C?
Write a program that will remove all blank lines from a file using C?
Write a program that will remove all blank lines from a file using C?
Write a program to accept the name,age&salary of 10 employees in array of structures.short this as per salary?
Write a program to accept 3 variables.print out the values an address these 3 variables using C?
Write a program to input a string and print it in reverse order using C programming?
  • 1
  • Comment

Other Answers (2)

Rated Highest
  • Rated Highest
  • Oldest
  • Newest
  • KGS answered 5 years ago
    #include<stdio.h>
    #include<conio.h>
    void rev(char a[]);
    main()
    {
    char s[30];
    clrscr();
    gets(s);
    rev(s);
    getch();
    }
    int i=0;
    void rev(char a[])
    {
    if(a[i]=='\0')
    return;
    rev(a+(i+1));
    printf("%c",a[i]);
    }
    • 2
    • Comment
  • DragonsOfWine answered 5 years ago
    char string[100];
    printf("Please enter string:");
    scanf("%s", string);

    for (int offset = strlen(string) - 1; offset >= 0; offset--)
    printf("%c", string[offset]);

    printf ("\n")'
    • 2
    • Comment
  • Sign In 

    to add your answer

Who is following this question?

    %
    BEST ANSWERS
    Member since:
    Points: Points: Level
    Total answers:
    Points this week:
    Follow
     
    Unfollow
     
    Block
     
    Unblock