Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define MAXLNE 200
- int main()
- {
- int len,i,j=0;
- char input[MAXLNE]="hello",output[MAXLNE];
- // printf("Enter the sentence : ");
- // scanf("%s",input);
- len=strlen(input);
- printf("Len= %d \n",len);
- i=len-1;
- while(i>=0)
- {
- output[j]=input[i];
- j++;
- i--;
- }
- output[j]='\0';
- printf("The output sentence : %s ",output);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement