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 |
Are there constructors in c?
what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }
Why doesnt this code work?
how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y
Differentiate between new and malloc(), delete and free() ?
Differentiate between a structure and a union.
Write a program to find the biggest number of three numbers in c?
Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A
How do you access command-line arguments?
Explain how can I avoid the abort, retry, fail messages?
Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.
In which header file is the null macro defined?