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 are enums in c?

1208


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

1078


What is sizeof return in c?

1040


Explain the difference between null pointer and void pointer.

1092


What is difference between static and global variable in c?

1059


How is a structure member accessed?

1135


What is void main () in c?

1214


Explain what are the __date__ and __time__ preprocessor commands?

1127


What is typeof in c?

1017


What does malloc () calloc () realloc () free () do?

1066


Is anything faster than c?

1016


Why array is used in c?

1016


How is actual parameter different from the formal parameter?

1026


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1209


Is c programming hard?

1033