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 |
Eight queens puzzle
What is the real time usage volatile?
say the following declaration is correct nr not. int b=a,n=0;
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
how many keywords are available in 'c' language a) 32 b) 34 c) 45 d) 48
difference between memcpy and strcpy
Why do we use return in c?
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
14 Answers CDAC, GATE, NDS, TCS,
What is dangling pointer in c?
What are the different categories of functions in c?
what is uses of .net
How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?