Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  csamp
Language: C/C++
Code:
#include <stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
     int length,i,j;
     char str[20],rev[20];
     printf("Enter the string");
     scanf("%s",str);
     length=(strlen(str)-1);
     for(i=length;i>0;i--)
     {
          rev[j]=str[i];
          j++;
     }
     rev[j++]='0';
     printf(" Entered String %s",str);
     printf("nReversed String %s",rev);
     getch();
     return 0;
}
          
          
          
          
          
Comments: