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


code for reverse alternate words from astring



code for reverse alternate words from astring..

Answer / rohit

#include<stdio.h>
#include<conio.h>
int main()
{
char string[30]="hoow are you?";
static char stoken[15][10];
int i,j,k;
j=0;k=0;

for(i=0;string[i]!='\0';i++,k++)
{
if(string[i]==' ')
{
j++;
k=0;
}
else
{
stoken[j][k]=string[i];
}
}
for(i=j;i>=0;i--)
printf("%s\n",stoken[i]);
getch();


return 1;
}

Is This Answer Correct ?    6 Yes 23 No

Post New Answer

More C Interview Questions

to get a line of text and count the number of vowels in it

2 Answers  


if the total selling price of 15 items and the total profit earned on them is input through the keyboard, write a program to find the cost price of one of the item

2 Answers  


how can i get output like this? 1 2 3 4 5 6

6 Answers   Excel,


Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001

2 Answers  


declare afunction pointer to int printf(char *)?

1 Answers   HCL,


to convert a string without using decrement operater and string functions

1 Answers  


What is pointer to pointer in c?

0 Answers  


Which node is more powerful and can handle local information processing or graphics processing?

0 Answers  


FILE PROGRAMMING

0 Answers   Wipro,


How to swap two values using a single variable ? condition: Not to use Array and Pointer ?

6 Answers  


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,


what is difference between strcmp & palindrome?

3 Answers  


Categories