pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used.
Answer Posted / paaru
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[20],i;
printf("\n\nEnter the string:");
gets(a);
for(i=strlen(a)-1;i>=0;i++)
{
printf("%d"a[i]);
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What is d scanf?
How do I create a directory? How do I remove a directory (and its contents)?
Tell me is null always defined as 0(zero)?
Can you add pointers together? Why would you?
Is javascript based on c?
If you know then define #pragma?
what is the different bitween abap and abap-hr?
Why do we use static in c?
Define and explain about ! Operator?
please explain every phase in the "SDLC" in the dotnet.
What is hashing in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is return type in c?
What is the role of && operator in a program code?
Does * p ++ increment p or what it points to?