Dear All,
I want reverse string i wrote code as follow:-
Code:
#include "stdio.h"
#include "string.h"
int main()
{
  char *str="shwetha";
  char *str1;
  while(*str!='\0')
  str++;
  while(*str1!='\0')
  {
    *str1=*str;
    str1++;
    str++;
  }
str1='\0';
printf("%s", str1);
return 0;
}
i am getting Run time error what is the problem?