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...

Reverse a string word by word??

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
char a[40],temp;
int count=0;
printf("enter the string :");
gets(a);
for(int i=0;a[i]!='\0';i++)
count++;
for(i=0;a[i]!='\0';i++)
{
if(count>i)
{
temp=a[i];
a[i]=a[count-1];
a[count-1]=temp;
count--;
}
else
break;
}
printf("the reversed ones is : ");
puts(a);
getch();
}

thank u

Is This Answer Correct ?    9 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a file descriptor in c?

1065


Can main () be called recursively?

1074


Write a program to check armstrong number in c?

1098


In c language can we compile a program without main() function?

1077


Explain continue keyword in c

972


Why c is a mother language?

981


Where can I get an ansi-compatible lint?

1110


Describe the order of precedence with regards to operators in C.

1011


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

1060


Can you explain the four storage classes in C?

1082


What is indirection? How many levels of pointers can you have?

1098


How do you define a string?

1060


Can the sizeof operator be used to tell the size of an array passed to a function?

1071


How can you draw circles in C?

1107


What is the scope of static variable in c?

961