What would you like to do?

C code programming to reverse a string?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

#include <stdio.h>

main ()
{
int i=0,k=0,j;
char a[30],b[30];
printf("\nEnter the string:\n");
gets(a);
while(a[i++]!='\0')
k++;
for (i = 0,j=k-1; i <k,j>=0 ; i++,j--)
b[i] = a[j];

printf("%s",b);
return(0);



}
15 people found this useful
Thanks for the feedback!

Write a program for reversing a string?

//code for reverse string class ReverseString { public static void main(String arg[]) { StringBuffer s=new StringBuffer("abcdef"); System.out.println("Before rever

Write a program for string reversal?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for

What is the C programming code to reverse a input string?

{   // get input char input[256]; gets(input); // reverse it char reverse[256]; strReverse(input, reverse);   } // reverses str and puts the result in bu

Write a program to implement the various operations on string such as length of string concatenation reverse of a string copy of a string to another in c anguage?

  These should work, if used correctly. // stores srcL + srcR into dest // NOTE: dest must be at least as large as srcL + srcR void strConcat(const char* srcL, const

In c program to reverse of given string using pointers?

/* To reverse the given string using pointer By $ */ #include #include void main () { char str[15]; char rev[15]; int i; int count; char* p; gets(str);

Program to reverse a string in java?

package sara78; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; import java.lang.IndexOutOfBou

C program to reverse the string?

char* strrev (char* string) { char* temp = string; char* last = string + strlen(string) - 1; while (string < last) *(string++) = *(last--); return temp; }

Write a program to find the reverse of a string in c?

include #include void main() { int i=0; char str[10]; clrscr(); printf("Enter the string:"); scanf("%c",str); while(str[i]!='\\0') i++; for(i=0;str[i]!='

C program code for concatenation of string?

// stores srcL + srcR into dest // NOTE: dest must be at least as large as srcL + srcR void strConcat(const char* srcL, const char* srcR, char* dest) { const int lengthL