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 |
What is structure packing ?
plz answer.. a program that takes a string e.g. "345" and returns integer 345
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,
why return type of main is not necessary in linux
Write a program to print prime nums from 1-20 using c programing?
What is use of pointer?
typedef struct { int i:8; char c:9; float f:20; }st_temp; int getdata(st_temp *stptr) { stptr->i = 99; return stptr->i; } main() { st_temp local; int i; local.c = 'v'; local.i = 9; local.f = 23.65; printf(" %d %c %f",local.i,local.c,local.f); i = getdata(&local); printf("\n %d",i); getch(); } why there there is an error during compiling the above program?
Why static is used in c?
Is the exit() function same as the return statement? Explain.
0 Answers Agilent, ZS Associates,
write a program to find a given no. is divisible by 3 or not without using any arthimetic operators?
What is the difference between new and malloc functions?
c program to arrange digits in a no in ascending and descending order