Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write C code to reverse a string such that if i/p is "abc
defg hij klmno pqrs tuv wxyz"
and the o/p should be "cba gfed jih onmlk srqp vut zyxw"

Answer Posted / naresh

man()
{
char ch[33];
printf("enter the string");
for(int i=0;i<33;i++)
scanf("%c",&ch[i]);
int k=0;
for(i=0;ch[i]!='/o';i++)
{
if(ch[i]==" ")
{ int n=i;
while(i>=k)
{
printf("%c",ch[i]);
i--;
}
k=n;
}
}
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will be the outcome of the following conditional statement if the value of variable s is 10?

1296


What is the use of define in c?

1064


Do you know the difference between exit() and _exit() function in c?

1062


What do you understand by normalization of pointers?

1060


What does *p++ do?

1025


What is difference between far and near pointers?

1044


What are the various types of control structures in programming?

1061


If fflush wont work, what can I use to flush input?

1106


What is sizeof c?

1077


How do you construct an increment statement or decrement statement in C?

1238


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1347


What is the use of gets and puts?

1032


What is a char c?

1043


How can I implement a delay, or time a users response, with sub-second resolution?

1078


Why c is called object oriented language?

1072